Cross platform spawning
whisper at oz.net
Tue Jun 11 18:51:23 CEST 2002
On windows use os.system("start python myscript.py myargument") to get a
seperate process going. This is analgeous to the trailing & on Linux.
Seattle, WA USA
> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Peter Scott
> Sent: Tuesday, June 11, 2002 8:55
> To: python-list at python.org
> Subject: Cross platform spawning
> I am trying to make a script spawn a seperate process, like you would
> do like this on unix:
> os.system('python myscript.py myargument &')
> But the & at the end (to make a separate process) doesn't work on
> Windows. I want the script to run on both Linux (*BSD, whatever) and
> Windows. I didn't want to have to find out the path to the python
> interpreter, so os.spawnlp (with no blocking) sounded perfect until I
> saw that it wasn't available on Windows.
> Does anyone out there know what I can do in this situation?
More information about the Python-list