starting externel program (win32)
Chris Gonnerman
chris.gonnerman at newcenturycomputers.net
Thu Nov 1 08:02:42 EST 2001
----- Original Message -----
From: "Marcus Stojek" <stojek at part-gmbh.de>
> Hi,
>
> from a script I want to start an external program (win32). This should
> be done in a way that is equivalent to typing the name and options at
> the dos prompt. The program must not be influenced by exiting the
> script.
>
> Do I have to use system(), spawnv() or spawnve() or something else?
> Any traps?
If it's a non-console Win32 app (i.e. NOTEPAD.EXE) you can do this:
os.system("start notepad.exe")
Add any parameters to the end of the string. This uses the Win9x/NT4/2K/XP
START.EXE program, which in effect is the same as Start, Run.
os.spawnv() would be the other way. Read the options; you want to use the
no-wait option so the script resumes immediately.
> Tanks
Yo wecome.
More information about the Python-list
mailing list