0

I execute a fortran code in python (linux) and generate files wich i'll use in others fortran codes as inputs. how do i do this in a python code without changing the fortran exes.

I mean run a fortran exe - got the file - use the file as input to run another fortran exe.

All in python

realfits
  • 11
  • 1
  • 2
    If you want to emulate running these from a shell, look into the `subprocess` module. – BallpointBen Feb 21 '17 at 17:48
  • See [this answer](http://stackoverflow.com/a/26215800/2383721) about doing it with `subprocess`. If the fortran code is already compiled, that should do it. If you need to compile the fortran code before running, something similar should work but would be considerably more difficult. – Daniel Underwood Feb 21 '17 at 17:49

0 Answers0