python subprocess使用
cmd = os.path.abspath('..')+"/worker/process/main.py"
proc = subprocess.Popen(["python3.5",cmd],stdout=subprocess.PIPE,
shell=True,preexec_fn=os.setsid)
#等价于
cmd1 ="python3.5 "+cmd
proc = subprocess.Popen(cmd1.split(),stdout=subprocess.PIPE,
shell=True,p
原创
2021-10-29 10:39:22 ·
277 阅读 ·
0 评论