how do i run another script from my python script
Steve Holden
steve at holdenweb.com
Thu Oct 27 12:57:54 EDT 2005
nephish at xit.net wrote:
> hey there all,
> i have been looking for a way to run a php command line script from my
> python script.
>
> here is what i want to do:
>
> if x = 4:
> execute php4 testin.php
> else:
> execute php4 testout.php
>
> and i also need the script to wait untill the php4 script is done
> (which i think is the default ) before continuing to run.
>
> i know this is possible, but how?
> thanks
>
import os
if x = 4:
script = "testin.php"
else:
script = "testout.php"
os.system(script)
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list