[英]run a Perl script from Python and stop it when finishes
I call and run a perl script inside a python script. 我在python脚本中调用并运行一个perl脚本。 It calls properly the perl script, works, but it does not stop...it seems that the perl script doesn't stop.
它可以正确调用perl脚本,可以正常运行,但是它不会停止……似乎perl脚本没有停止。
How can i solve it? 我该如何解决? if I run manually the perl script alone it stops.
如果我仅手动运行perl脚本,它将停止。
I use... 我用...
import subprocess
pipe = subprocess.Popen(["perl", "/home/scripts/cat.pl"])
将以下行添加到您的python程序中
pipe.wait()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.