摘要:# 执行命令,返回是否执行成功retcode = subprocess.call("for tar in %s/*.tar.gz;do tar zxvf $tar -C %s;done" %(first_dir,first_dir))#执行命令,返回执行命令的结果,close_fds防止僵尸进程大量
阅读全文
摘要:1 from django.db import models 2 3 # Create your models here. 4 class Idc(models.Model): 5 name = models.CharField("机房名称",max_length=32) 6 address = m
阅读全文
摘要:import time from threading import Thread class worker(Thread): def run(self): for x in xrange(0,11): print x time.sleep(1) class waiter(Thread): def run(self...
阅读全文