Call Perl script from Python

后端 未结 5 1868
名媛妹妹
名媛妹妹 2020-12-08 11:37

I\'ve got a Perl script that I want to invoke from a Python script. I\'ve been looking all over, and haven\'t been successful. I\'m basically trying to call the Perl scrip

5条回答
  •  悲&欢浪女
    2020-12-08 12:00

    Just do:

    var = "/some/file/path/"
    pipe = subprocess.Popen(["perl", "uireplace.pl", var])
    

提交回复
热议问题