[SOLVED] Re: Threading and Windows.

Tim Evans t.evans at paradise.net.nz
Sat Oct 4 01:52:39 EDT 2003


Jorge Godoy <godoy at metalab.unc.edu> writes:
> [snip]...it ended up as (this is in a separate method on the main
> program):
> 
>         if (sys.platform == 'win32'):
>             python = 'c:/python22/pythonw.exe'
>             os.spawnv(os.P_NOWAIT, python, [python, program, parameter])
>         else:
>             os.spawnv(os.P_NOWAIT, program, [program, parameter])

You should probably just be using this on both systems:

os.spawnv(os.P_NOWAIT, sys.executable, [sys.executable, program, parameter])

-- 
Tim Evans




More information about the Python-list mailing list