import subprocess
retcode = subprocess.call([\"/home/myuser/go.sh\", \"abc.txt\", \"xyz.txt\"])
When I run these 2 lines, will I be doing exactly t
I recently ran into this problem with a script that looked like this:
% cat /tmp/test.sh
<-- Note the empty line
#!/bin/sh
mkdir /tmp/example
The script ran fine from the command line, but failed with
OSError: [Errno 8] Exec format error
when executed via
subprocess.Popen(['/tmp/test.sh']).communicate()
(The solution, of course, was to remove the empty line).