OSError: [Errno 8] Exec format error

后端 未结 5 1097
孤街浪徒
孤街浪徒 2020-12-05 13:09

I am having hard time parsing the arguments to subprocess.Popen. I am trying to execute a script on my Unix server. The script syntax when running on shell prompt is as fol

5条回答
  •  误落风尘
    2020-12-05 13:45

    Have you tried this?

    Out = subprocess.Popen('/usr/local/bin/script hostname = actual_server_name -p LONGLIST'.split(), shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 
    

    Edited per the apt comment from @J.F.Sebastian

提交回复
热议问题