Templates¶
F2x uses templates to generate the code. There are a bunch of templates that come bundled with F2x:
|
Generate a ISO C compliant interface to a Fortran module using BIND(C). |
|
|
Generates a thin C layer that is used as clean stack snapshot for longjmp error handling. |
|
|
Generates a Python module that interacts with a ISO C interface generated by ‘bindc’ template using ctypes including error handling using ‘cerr’ template. |
|
|
Generates a Python module that interacts with a ISO C interface generated by ‘bindc’ template using ctypes. |
|
|
Generates a Sphinx documentation for a module. |
Choosing a Template on Command Line¶
When you use the F2x CLI to wrap your sources, you can select templates by specifying the -t switch. You have three possibilities of accessing template files:
The name of a built-in template. These start with an ‘@’ character and are listed in the table above.
The full (relative) path to a template file.
A path relative to one of the template path directories. You can adjust the template path using the -T switch.