上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 多行字符串拼接使用小括号s = ('select *' 'from atable' 'where id=888')print s, type(s)#输出select *from atablewhere id=888 python遇到未闭合的小括号,自动... 阅读全文
posted @ 2017-02-02 21:32 妙音 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 在powershell上执行get-childitem * -include *.pyc -recurse |remove-item或者使用别名ls * -include *.pyc -recurse |rm 阅读全文
posted @ 2016-09-26 20:56 妙音 阅读(868) 评论(0) 推荐(0) 编辑
摘要: 32位python在windows上调用命令行(os.system或subprocess.Popen)。执行后,如果返回码太大,python取得的返回值也是0。此时无法判断执行成功还是失败,这个是32位python的bug。以时间同步命令w32tm位例子在cmd上执行... 阅读全文
posted @ 2016-09-26 20:41 妙音 阅读(461) 评论(0) 推荐(0) 编辑
摘要: runas /noprofile /user:Administrator cmdrunas 允许用户用其它权限运行指定的工具和程序/noprofile 指定不应该加载用户的配置文件。/user:UserAccountName 指定在其下运行程序... 阅读全文
posted @ 2016-09-26 19:48 妙音 阅读(2515) 评论(0) 推荐(0) 编辑
摘要: 查看修改历史,出现下面”乱码”修改: "data/python\345\255\246\344\271\240\350\265\204\346\226\231.wiki"解决方法git config --global core.quotepath false显示... 阅读全文
posted @ 2016-05-27 05:25 妙音 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 起因在tornado中用apscheduler实现计划任务,出现错误提示 “maximum number of running instances reached (1)”2015-12-04 19:10:22,227 - apscheduler.scheduler ... 阅读全文
posted @ 2015-12-15 21:03 妙音 阅读(5590) 评论(1) 推荐(0) 编辑
摘要: 介绍paramiko是python的一个模块,遵循SSH2协议。 paramiko的功能:1、通过ssh执行命令; 2、通过ssh传输文件。示例import paramikossh = paramiko.SSHClient()ssh.load_system_host_... 阅读全文
posted @ 2015-11-13 20:48 妙音 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 介绍vagrant封装linux开发环境,可以统一团队成员的开发环境。封装后,可以linux/windows/mac上运行.环境以win8安装vagrant为例子。vagrant需要virtualbox提供虚拟化支持,因此先安装virtualbox。安装https:/... 阅读全文
posted @ 2015-11-13 20:47 妙音 阅读(311) 评论(0) 推荐(0) 编辑
摘要: salt使用主从结构配置、管理、监控远程机器。配置简单,功能强大,是很好的运维管理工具。准备环境使用vmware,准备两台虚拟机192.168.8.10和192.168.8.20,192.168.8.10作为master,192.168.820作为minion.mas... 阅读全文
posted @ 2015-11-13 20:39 妙音 阅读(159) 评论(0) 推荐(0) 编辑
摘要: ssh初次登录某个主机时,出现如下提示Are you sure you want to continue connecting (yes/no)?如何去掉?打开/etc/ssh/ssh_config,修改以下配置项# StrictHostKeyChecking as... 阅读全文
posted @ 2015-11-11 03:21 妙音 阅读(1153) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页