Enter parameters into Fortran executable from python cgi script

John Hunter jdhunter at ace.bsd.uchicago.edu
Fri Jul 11 17:51:50 CEST 2003

>>>>> "lamar" == lamar air <lamar_air at hotmail.com> writes:

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

If you want to interact with a program, you need to use popen2 or
popen3, which give you access to the stdin, stdout and stderr

See this thread for a similar discussion and working example:


Note, you could also expose the fortran functions to python directly
with f2py.  It is really very easy and automated


John Hunter

More information about the Python-list mailing list