[Tutor] Calling a python script using subprocess
James Mills
prologic at shortcircuit.net.au
Fri Apr 29 02:41:32 CEST 2011
On Fri, Apr 29, 2011 at 7:18 AM, GoodPotatoes <goodpotatoes at yahoo.com> wrote:
>
> p = subprocess.Popen(r'installModule.py --mods mod1 mod2 mod3', executable = sys.executable, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
Try this (untested):
p = subprocess.Popen(["/usr/bin/env python", "installModule.py",
"--mods", "mod1", "mod2", "mod3"], stdout = subprocess.PIPE, stderr =
subprocess.STDOUT)
cheers
James
--
-- James Mills
--
-- "Problems are solved by method"
More information about the Tutor
mailing list