python执行系统命令 python 2016-03-21 阅读(1494) import subprocess key = subprocess.Popen('./genkey.sh', shell=True,stdout=subprocess.PIPE,cwd='/home/keke/videoweb/tools/') for line in sig.stdout.readlines(): print line,111111111111 retval = key.wait() Tags: >python