11 2016 档案

摘要:#Elaine:master;Dylan:minion#利用salt给minion安装包[root@elaine states]# vim /etc/salt/master 1 default_include: master.d/*.conf 2 3 interface: 0.0.0.0 4 5 ' 阅读全文
posted @ 2016-11-21 16:17 Dylan_Wu 阅读(374) 评论(0) 推荐(0)
摘要:1 #!/usr/bin/env python 2 # coding:utf-8 3 from threading import Thread 4 from Queue import Queue 5 import time 6 7 8 9 10 class Procuder(Thread): 11 def __init__(self,name,queue): ... 阅读全文
posted @ 2016-11-21 16:02 Dylan_Wu 阅读(237) 评论(0) 推荐(0)
摘要:使用了给字典排序的sorted方法 阅读全文
posted @ 2016-11-08 09:07 Dylan_Wu 阅读(737) 评论(0) 推荐(0)
摘要:1.sorted函数按key值对字典排序 先来基本介绍一下sorted函数,sorted(iterable,key,reverse),sorted一共有iterable,key,reverse这三个参数。 其中iterable表示可以迭代的对象,例如可以是 dict.items()、dict.key 阅读全文
posted @ 2016-11-08 09:03 Dylan_Wu 阅读(82096) 评论(3) 推荐(2)
摘要:1 import os; 2 import sys; 3 import time; 4 5 class DeleteLog: 6 def __init__(self,filename,days): 7 self.filename=filename; 8 self.days=days; 9 10 def delete(sel... 阅读全文
posted @ 2016-11-06 14:34 Dylan_Wu 阅读(1061) 评论(0) 推荐(0)