[Tutor] Opening a dos exe

Ray Parrish crp at cmc.net
Sat Mar 13 13:16:35 CET 2010


Emile van Sebille wrote:
> On 3/10/2010 11:33 AM Armstrong, Richard J. said...
>> The problem comes in that the dos program requires three
>> inputs (input1.txt, input2.txt and input3.txt - see attached picture)
>> 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.

You could write out startprogram.bat 
programatically, just before you
call it, then remove it after running it to reduce 
clutter.

Hope this is what you're looking for.

Later, Ray Parrish

-- 
Linux dpkg Software Report script set..
http://www.rayslinks.com/LinuxdpkgSoftwareReport.html
Ray's Links, a variety of links to usefull things, 
and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to 
be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com





More information about the Tutor mailing list