Executing DOS (yes, DOS) program from within Python?

Ben Fairbank baf at texas.antispam.net
Mon Oct 6 20:28:36 EDT 2003


I am preparing a Python program that has to call a DOS statistical
program that asks the user to give an input file name and an output
file name from the console, it then reads input, processes the data,
and writes the output file (quaint, no?).  I want to run it without
keyboard input, but rather using Python statements to specify the same
input and output files every time it runs.  (It is a compiled Pascal
program and changing its I/O and recompiling is not really an option.)
I have looked through Hammond and Robinson without finding any
suggestions; can a reader tell me where the proper Python way to do
that is documented?

Thanks,

Ben Fairbank




More information about the Python-list mailing list