simple question ... exec in W32?
Stuart Ford
Stuart.Ford at Boeckh.com
Wed Jun 28 18:33:33 EDT 2000
Brian Alexander <crystalc at interlog.com> wrote in message
news:<Nxu65.20928$Ip.511269 at cac1.rdr.news.psi.ca>...
> Hello;
>
> How to I start a W32 application, like Word etc, from a Python script? I'm
> actually trying to rewrite a backup script, which, additionally, does a
lot
> of non-backup processing overnight.
>
Brian,
Look at the os module..
you can launch a process with the spawnv function..
Ex: os.spawnv(os.P_WAIT, 'c:\\winnt\\notepad.exe', ())
This will launch notepad, and stop processing instructions until notepad
is closed..
There are several spawn modes available..
(P_WAIT, P_NOWAIT, P_OVERLAY and P_DETACH)
Stuart
More information about the Python-list
mailing list