如果您只想打开通往perl解释器的管道,那么您的方向正确。我认为您唯一缺少的是perl脚本本身不是可执行文件。因此,您需要这样做:
var = "/some/file/path/"pipe = subprocess.Popen(["perl", "./uireplace.pl", var], stdin=subprocess.PIPE)pipe.stdin.write(var)pipe.stdin.close()
欢迎分享,转载请注明来源:内存溢出
如果您只想打开通往perl解释器的管道,那么您的方向正确。我认为您唯一缺少的是perl脚本本身不是可执行文件。因此,您需要这样做:
var = "/some/file/path/"pipe = subprocess.Popen(["perl", "./uireplace.pl", var], stdin=subprocess.PIPE)pipe.stdin.write(var)pipe.stdin.close()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)