Calling Fortran from Python
Lenard Lindstrom
len-l at telus.net
Thu Apr 5 13:12:37 EDT 2007
Mangabasi wrote:
> A little bit of googling solved the problem. instead of
>
>>>> sample = cdll.sample_dll.SAMPLE
>
> I used
>
>
>>>> sample = windll.sample_dll.SAMPLE
>
> and now it seems to be working without error messages.
>
> Thanks a lot.
>
>
I remember someone on the ctypes mailing list mentioning that g77 uses
the C calling convention for exported functions. Other compilers might
default to standard calls. At least with ctypes one can tinker with
calling convention and function arguments to make a call work.
Lenard
More information about the Python-list
mailing list