Enter parameters into Fortran executable from python cgi script

lamar_air lamar_air at hotmail.com
Fri Jul 11 10:34:51 EDT 2003


I have a fortran executable which when run from cmd it asks for a
series of parameters which you enter then hit enter.
>From my python cgi script i want to be able to run the executable. 
Enter the 4 or 5 parameters needed then end the executable and
redirect to another web page which will display some results given
from an output file from the fortran executable.

When the user clicks submit on the form it seems to hang up on the
interaction between python cgi and fortran exe.  In this example the
fortran exe only accepts on variable then terminates.

How do i do this correctly?
testrun3 can be accesed from any dir because it's directory is set in
the environment variables.

import os
os.system("testrun3") 
os.system("Y")
os.system("exit")




More information about the Python-list mailing list