Running a DOS exe file from python

lblr33 at lblr33 at
Thu Jan 26 22:54:30 CET 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.


More information about the Python-list mailing list