This worked for me on a project I did a couple of months ago. It did =
its thing for a couple of minutes then when it exited the Python script =
resumed.
...
import os
...
os.spawnv(os.P_WAIT, os.path.join(gmpath,'gmw4.exe'),
[r' /u:MASTER', r' /p:ACCESS', r' /r:69,5'])
...
spawnv (mode, path, args)=20
Execute the program path in a new process, passing the arguments =
specified in args as command-line parameters. args may be a list or a =
tuple. mode is a magic operational constant. See the Visual C++ Runtime =
Library documentation for further information. Availability: Windows. =
New in version 1.5.2.=20
P_WAIT=20
P_NOWAIT
P_NOWAITO
P_OVERLAY
P_DETACH
Possible values for the mode parameter to spawnv() and spawnve(). =
Availability: Windows. New in version 1.5.2.=20
Karl Putland
kperacles@geocities.com
Craig Curtis <c.curtis@worldnet.att.net> wrote in message =
news:19990801171952.JFVG5731@default...
> I am trying to spawn c:\windows\notepad.exe from a Python program. I =
want
> the python script to wait for Notepad to exit. =20
> How can I do this? =20
>=20
> I have tried all combinations I can think of using execv, spawn, =
system and
> cannot get it to work.
>=20
> Could someone please post the exact command sequence to type in.
>=20
> Thanks in advance,
> Craig Curtis
>=20
>=20