F2PY

The purpose of the F2PY --Fortran to Python interface generator-- project is to provide connection between Python and Fortran languages. F2PY is a Python extension tool for creating Python C/API modules from (handwritten or F2PY generated) signature files (or directly from Fortran sources). The generated extension modules facilitate: Calling Fortran 77/90/95, Fortran 90/95 module, and C functions from Python. Accessing Fortran 77 COMMON blocks and Fortran 90/95 module data (including allocatable arrays) from Python. Calling Python functions from Fortran or C (call-backs). Automatically handling the difference in the data storage order of multi-dimensional Fortran and Numerical Python (i.e. C) arrays. In addition, F2PY can build the generated extension modules to shared libraries with one command. F2PY uses the scipy_distutils module from SciPy that supports number of major Fortran compilers. F2PY generated extension modules depend on NumPy package that provides fast multi-dimensional array language facility to Python.