据我了解,您想运行一个命令,然后将其传递给其他命令:
from subprocess import Popen, PIPEp = Popen("/path/to/env.sh", stdin=PIPE) # set environment, start new shellp.communicate("python something.pynexit") # pass commands to the opened shell
欢迎分享,转载请注明来源:内存溢出
据我了解,您想运行一个命令,然后将其传递给其他命令:
from subprocess import Popen, PIPEp = Popen("/path/to/env.sh", stdin=PIPE) # set environment, start new shellp.communicate("python something.pynexit") # pass commands to the opened shell
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)