Re: Calling FORTAN dll functions from Python



On Dec 7, 3:11 am, "Alex van der Spek" <zd...@xxxxxxxxx> wrote:
Does anyone know how to call functions from FORTRAN dlls in Python? Is it
even possible? I browsed the documentation for Python 2.6.1 and the Python/C
API comes close to what I would like to do but it is strictly limited to C.

Unfortunately the passing of arguments in C and FORTRAN is very different,
not to mention the differences with strings where FORTRAN expects a hidden
length argument. It could call the FORTRAN dll from C and call the C
functions from Python but is that my only option?

I'd recommend f2py, which is part of the numpy package.


Carl Banks
.