Running a DOS exe file from python

lblr33 at yahoo.com lblr33 at yahoo.com
Thu Jan 26 16:54:30 EST 2006


I would like to execute a windows program from python and wait for it
to finish before returning to the python script.

The script I want to run has a set number of arguments.

The following does work fine:
os.system(r"c:\tmp\myprog.exe arg1 arg2 arg3")

The problem I have is that the path to myprog.exe and the arguments are
variable so I need to pass them in as arguments to myprog.exe.

Thanks




More information about the Python-list mailing list