[Tutor] running a .exe

Kent Johnson kent37 at tds.net
Fri Dec 23 00:18:34 CET 2005

Robin Buyer wrote:
> How do you run a .exe from inside a python program.
> random example:
> print "What would you like to do today? "
>     print "E - email"
>     print "I - internet"
>     what = input("Choose: ")
>     if what == "E":
>         Heres where i would need to run IEXPLORE.exe

Look at os.system() (simple) and the subprocess module (more complicated and flexible).


More information about the Tutor mailing list