将python作为shell运行

import os
for dir in os.listdir("./"):
  print dir
  dir.split(".")
 
for root, dir, name in os.walk("./")
import time
today = time.strftime("%y%m%d")
yesday = time.strftime("%Y-%m-%d", time.localtime(time.time() - 3600*24) )
if time.localtime().tm_wday == 6 :
    dirs = ['5comm', '5game', '5life',  '5forum', '5geek', '5tech', 'ucenter', 'tw_survey']
    for dir in dirs:
        cmd = "cd %s; tar zcvf %s%s_%s.tar.gz %s" %(webpath, webbackup_path, dir, today, dir);
        print cmd
        os.system(cmd);
python/python_as_shell.txt · 最后更改: 2009/08/19 01:48 由 kenvin
到顶部
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 红麦软件 红麦软件