[Tutor] Running and passing variables to/from Fortran
andreas at kostyrka.org
Sun May 6 11:51:43 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Simple is the wrong idea. But I'd guess that you can access your Fortan
from C. If so, Pyrex provides a C-for-Python-coder tool. OTOH, just
reading the stuff in Python might be simpler than doing all the
interfacing. (I presume that you are just reading the data. If you have
verified working numeric code in Fortran, it's probably worthwhile to
interface with it instead of porting it).
John Washakie wrote:
> I have a FORTRAN program which reads in unformatted sparse matrix
> data. Rather than rewriting the code in Python, I was hoping there is
> a way to call the Fortran program, passing filename variables TO
> Fortran, and returning the data (which is an array) back to my .py
> code for use there.
> Is there a simple example of this that someone knows of?
> Tutor maillist - Tutor at python.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Tutor