python to call or start a fortran a.out

Chet Buell clbuell at ncsu.edu
Mon Aug 21 11:52:51 EDT 2017


Need some help with updating python to call or start a fortran a.out 
executable

The problem I am having is I have an old Fortran based model that I need 
to run, in the past the fortran was triggered through the following 
python code:

#run fortran
x = commands.getoutput(path+'/a.out')

Since the commands.getoutput has been depreciated it will not run on the 
newly built server that will now host this model. I have manually 
confirmed that the compiled a.out does run and produces the files, but 
the problem I am having is in triggering it to run with python.

The answer is probably so easy it is obviously being overlooked, but I 
can not seem to find it.  Any suggestions or help would be greatly 
appreciated.







More information about the Python-list mailing list