导航

 

2016年5月5日

摘要: 最近在用Paramiko 开发一款远程测试调试框架,结果发现目录怎么都无法切换,查了下原因,在http://bbs.chinaunix.net/thread-1675446-1-1.html看到了 所以解决办法就是目录连在一起写,用;隔开,或者用invoke_shell方法 在一些命令会有多行输出时 阅读全文
posted @ 2016-05-05 14:24 slqt 阅读(2485) 评论(0) 推荐(0) 编辑
 
摘要: 计算类执行时间的装饰器: 计算普通函数执行时间的装饰器: 使用类装饰器: 使用函数装饰器: 重要的在于灵活运用,比如 阅读全文
posted @ 2016-05-05 09:29 slqt 阅读(367) 评论(0) 推荐(0) 编辑
 

2016年5月3日

摘要: gun.conf的内容 tests.py 的内容 注意要在nginx.conf中配置一个反向代理,监听5000端口,内容如下: 启动脚本:gunicorn -c gun.conf run_test:app 阅读全文
posted @ 2016-05-03 11:15 slqt 阅读(3143) 评论(0) 推荐(0) 编辑
 

2016年4月19日

摘要: # -*- coding: utf-8 -*-'''The client module is used to create a client connection to the publisherThe data structure needs to be: {'enc': 'clear', 'lo 阅读全文
posted @ 2016-04-19 18:50 slqt 阅读(687) 评论(0) 推荐(0) 编辑
 

2016年4月14日

摘要: 运行问题 1、直接物理性移除minion或者更换minion原先连接的master,会导致先前的master始终无法ping通minion [root@localhost salt]# salt '*' test.ping minion_centos7: True win_minion: True 阅读全文
posted @ 2016-04-14 11:59 slqt 阅读(2910) 评论(0) 推荐(0) 编辑
 

2016年4月10日

摘要: python动态变量名 值得注意的是,用python动态变量名这个功能时,外部传入的参数不可以与代码内部定义的变量名相同,否则会引起变量交叉读取错误,从而导致代码错误并且抛出一个变量无法读取的异常,原因目前未知,需要解析python底层库的源码 解决办法:在python代码中定义极为变态的变量名,外 阅读全文
posted @ 2016-04-10 16:17 slqt 阅读(614) 评论(0) 推荐(0) 编辑
 

2016年4月6日

摘要: 安装 一、安装方法:http://www.linuxeye.com/Linux/2765.html 二、建议安装epel后安装saltstack:http://www.a8z8.com/html/2015/tech_0127/435.html 配置 建议参看http://setjs.com/?p=2 阅读全文
posted @ 2016-04-06 10:29 slqt 阅读(203) 评论(0) 推荐(0) 编辑
 
摘要: 转载自:http://www.cnblogs.com/codingmylife/archive/2010/06/06/1752807.html 这个星期开始学习Python了,因为看的书都是基于Python2.x,而且我安装的是Python3.1,所以书上写的地方好多都不适用于Python3.1,特 阅读全文
posted @ 2016-04-06 09:14 slqt 阅读(187) 评论(0) 推荐(0) 编辑
 

2016年3月29日

摘要: 以下其他仅做参考,官方网址才是安装重点:http://docs.saltstack.cn/topics/installation/rhel.html 与安装相关的一些文档或资料: 一、linux服务器安装: http://blog.chinaunix.net/xmlrpc.php?r=blog/ar 阅读全文
posted @ 2016-03-29 18:36 slqt 阅读(8850) 评论(0) 推荐(0) 编辑
 

2016年3月24日

摘要: 1、模板html文件里一定要加 <!DOCTYPE html><meta http-equiv="Content-type" content="text/html; charset=utf-8"><html lang="zh"> 这几句,否则就会报python35 django utf-8' cod 阅读全文
posted @ 2016-03-24 14:41 slqt 阅读(375) 评论(0) 推荐(0) 编辑