[Tutor] Opening a dos exe
alan.gauld at btinternet.com
Sat Mar 13 15:50:33 CET 2010
"Ray Parrish" <crp at cmc.net> wrote
>>> but I cannot find a way of getting this information to the dos program
>>> from python. Any ideas?
> You could use os.system("startprogram.bat"), and
> create startprogram.bat
> to run the dos program, and feed it the files,
> either all at once, or one at a time via the command line if it accepts
> command line input.
I don't think you can do the second option with a bat file. There is no
way to interactively respond to the program once it starts. Thats why
WSH is better for that kind of interactive input.
Or just use subprocess.Popen...
Author of the Learn to Program web site
More information about the Tutor