Extending Python with Fortran

Python is a great scripting language. It is portable, free, and has a powerful numerical facility, object oriented features, and a library of modules that enable a huge variety of applications: cryptography, image processing, special effects for movies, Web programming, Web site search engines, and so on. The authors have created a tool, Pyfort, for connecting Fortran routines to Python. To use Pyfort, you create an input file that describes the Fortran functions and subroutines you wish to access from Python. This file uses a syntax that is close to a subset of the Fortran 95 interface syntax. Once the input file is prepared, you execute the Pyfort tool. The tool produces one or more Python extension modules, which you then compile and load into Python, either statically or dynamically, as desired.