How to call another file

Thomas Heller theller at python.net
Fri May 17 13:54:08 EDT 2002


"Kragen Sitaker" <kragen at pobox.com> wrote in message news:83vg9mu0fn.fsf at panacea.canonical.org...
> claird at starbase.neosoft.com (Cameron Laird) writes:
> > Or not.  Most Windows users can write
> >   import os
> >   os.system("notepad")
> >   os.system("start mypage.html")
> > Depending on the installation of SAS, it might be at least
> > as easy, in a superficial way, to invoke it under Windows
> > as under Unix.
>
> I thought about "start"; unfortunately, it runs stuff in the
> background and returns immediately, which is not what the OP wanted.
>
That's where the /WAIT switch is for, available on win2k at least:

os.system("start /WAIT mypage.html")

At the command prompt enter 'help start' for more information.

Thomas





More information about the Python-list mailing list