Cross platform spawning

David LeBlanc whisper at
Tue Jun 11 18:51:23 CEST 2002

On windows use os.system("start python myargument") to get a
seperate process going. This is analgeous to the trailing & on Linux.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at
> [mailto:python-list-admin at]On Behalf Of Peter Scott
> Sent: Tuesday, June 11, 2002 8:55
> To: python-list at
> 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 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 mailing list