Python/Fortran interoperability

sturlamolden sturlamolden at
Mon Aug 24 03:40:06 CEST 2009

On 24 Aug, 02:57, nos... at see.signature (Richard Maine) wrote:

> Yes, it is no surprise that the C interop stuff fails to address this,
> since it isn't in C. Something different/extra would be needed, which is
> exactly what Nick said. I'm going to jump out of the middle of this now.
> The only reason I jumped in was to point out the gap in communication,
> where Nick said that the TR doesn't handle "OOP derived types" and you
> replied that it does so do derived types, omitting the OOP part, which
> was clearly (to me) Nick's whole point.

You are right, I missed th OOP part.

It might be interesting in teh future to say inherit a Python class
from a Fortran 2003 derived type. I have no idea how to do this (I
don't know Fortran 2003 that well). But possibly one could do some
magic with the ISO C bindings, exposing the Fortran 2003 derived type
as a C etxtension class to Python.

Does anyone use OOP in Fortran anyway? I sure do not. And Fortran 2003
compilers are not ubiquitous. Fortran compilers tend to support a
subset for Fortran 2003, usually ISO C bindings but not OOP.


More information about the Python-list mailing list