So I am in a bit of a pickle. I am trying to write plotting and fitting extensions to a Fortran77 (why this program was rewritten in F77 is a mystery too me, btw) code that requires command line input, i.e. it prompts the user for input. Currently the program uses GNUplot to plot, but the GNUplot fitting routine is less than ideal in my eyes, and calling GNUplot from Fortran is a pain in the ass to say the least.
I have mostly been working with Numpy, Scipy and Matplotlib to satisfy my fitting and plotting needs. I was wondering if there is a way to call the F77 program in Python and then have it run like I would any other F77 program until the portion where I need it to fit and spit out some nice plots (none of this GNUplot stuff).
I know about F2PY, but I have heard mixed things about it. I have also contemplated using pyexpect and go from there, but I have have bad experience with the way it handles changing expected prompts on the screen (or I am just using it incorrectly).
Thanks for any info on this.
subprocess. But I think you are hoping to get access to the running FORTRAN program memory as a numpy array?