On 1/17/2015 9:11 AM, Greg Fischer wrote:
Hello,

I would like to use f2py to wrap a Fortran module that contains a derived data type. I don't necessarily need to access the data that is inside the derived type from Python, but I would really like to be able to call the subroutines that are contained inside the module.

When I attempt to use f2py on this module, it appears to choke when it gets to the derived data type. Is there any way around this?

Thanks,
Greg


_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Greg,

    F2py does not support Fortran derived types natively [1].  I have had good luck using James Kermode's f90wrap [2] to wrap Fortran code with derived types.

Cheers,
    - Jonathan Helmus

[1] https://sysbio.ioc.ee/projects/f2py2e/FAQ.html#q-does-f2py-support-derived-types-in-f90-code
[2] http://www.jrkermode.co.uk/f90wrap