Step 3: compile C code into extension module
Run
Unix/DOS> f2py -c hw.pyf hw.c
Test:
import hw print hw.hw3(1.0,-1.0) print hw.__doc__
One can either write the interface file by hand or write F77 code to generate, but for every C function the Fortran signature must be specified