林执行的模块和popen1.py的呼叫popen2.py使用子模块,通过POPEN执行的模块
但popen2.py的输出是不是被displayed..When我显示子进程id ,它是displayed..Where输出是否会被打印,popen2.py
呼叫
child = subprocess.Popen(['python', 'popen2.py',"parm1='test'","parm='test1'"], shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
如果你正在从python执行python代码,为什么不''execfile'或'import'?是真正必需的第二个过程 – tMC
@mgilson谢谢 – tMC
@tmc:我可以使用execfile传递参数吗 – user1050619