发布时间:2013-11-26 17:26:37
import reimport sysimport platformnum_threads = 10queue = Queue()def pinger(i,q): while True: ip=q.get() if platform.system() == 'Linux': cmd="ping -c 1 %s"%ip  .........【阅读全文】
发布时间:2013-11-26 12:41:38
#/usr/bin/env#coding:utf8import tarfile,osdef create_tar(destdir,filename): tar =tarfile.open(filename,"w:gz") for root,dir,files in os.walk(destdir): for file in files: .........【阅读全文】
发布时间:2013-11-25 17:05:17
#/usr/bin/env#coding:utf8import os,sysdef getline(filepath,line_num): if line_num < 1: return '' for current_line_num,line in enumerate(open(filepath,'rU')): &nbs.........【阅读全文】
发布时间:2013-11-25 16:34:33
#/usr/bin/env#coding:utf8import os,sys#使用提示args=len(sys.argv)if not 3<=args<=5: print "输入格式:python test.py 被替换字符 替换字符 源文件 目标输出文件"else: readed_file = sys.stdin writed_file .........【阅读全文】
发布时间:2013-11-11 10:26:00
#coding:utf8#!/usr/bin/env pythonimport threadingimport httplibimport randomimport timeimport osimport sysimport urllib2from Queue import Queue#http://192.168.1.254:9090/2013/10/10/p_131010210525-moveWorldMap/9711-40380.zip'''class :RequestThread 请求URLfunc :request_url(self) 创建各.........【阅读全文】