(May-30-2018, 09:31 AM)killerrex Wrote: I think the problem is that 'cpt.py' is not an executable, so Popen fails in the execution.
As you have also redirected the stderr to a pipe you cannot see the error message that shall looks like "cpt.py: Not an executable"
stderr
definition is for the process itself - not for subprocess.Popen
. The script did not start, among other reasons (let's assume that it has execution flag set and shebang line added, as per your advice):- Path to the app was not set - like
./cpt.py
- Command string as parameter may only be provided when it is coupled with
shell=True
; with default valueFalse
list is required (as you have shown)
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.