We often need to incorporate into our workflow some code written in different languages; mostly C/C++ or Fortran, and also from R, Matlab, or Octave. Python excels at allowing code from all these other sources to run from within; care must be taken to convert different numerical types to something that Python understands, but this is pretty much the only issue we encounter.
SciPy provides a simple way of including Fortran code –
f2py. This is a utility shipped with the NumPy libraries, which is operative when
distutils from SciPy are available. This is always the case when we install SciPy.
f2py utility is supposed to run outside of Python, and it is used to create from any Fortran file, a ...