I am trying to run the below Popen command in OSX using shell=False:
command = "/usr/local/itms/share/iTMSTransporter.woa/iTMSTransporter -m verify -f /Volumes/Stuff/Temp/TMP_S_0_V_TV2.itmsp -u username -p password -o /Volumes/Stuff/Temp/TMP_S_0_V_TV2.itmsp/LOGFILE.txt -s provider -v eXtreme"
self.process1 = Popen(command, shell=False, stdin=PIPE)
But am getting this error:
raise child_exception
OSError: [Errno 2] No such file or directory
What is going wrong? I also need this to function in Windows, I am aware of the directory paths, slashes, etc.
Popen's first argument should be a list of args. Otherwise you're telling it to find an executable named strangely.
You can use shlex.split()
to split correctly
like Popen(shlex.split(command), shell=False, stdin=PIPE)
further reading: Popen docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With