Yes subprocess.Popen(cmd, ..., shell=True)
works like a charm. On Windows the .py
file extension is recognized, so Python is invoked to process it (on *NIX just the usual shebang). The path environment controls whether things are seen. So the first arg to Popen
is just the name of the script.
subprocess.Popen(['myscript.py', 'arg1', ...], ..., shell=True)