我有旧的python。所以不能使用子进程。 我有两个python脚本。一个primary.py和另一个secondary.py。 运行primary.py时,我需要运行secondary.py。用os.system运行另一个python脚本
格式运行secondary.py是 '蟒蛇secondary.py参数'
os.system('python secondary.py Argument')...is giving error saying that can't open file 'Argument': [Errno 2] No such file or directory
你可以* *使用[子反向移植(https://code.google.com/p/python-subprocess32/)。 – 2013-05-01 20:55:20
您在下面的评论中提到您使用的是Python 2.6。子进程可用于该版本的Python。 – SethMMorton 2013-05-01 21:22:16