资 源 简 介
A very small library to parse a Fortran Namelist into a python class (dictionary derived).
Fortran namelist are a very handy feature to set options in Fortran programs.
The problem in their use is they cannot be validated directly into Fortran. A invalid Fortran namelist often cause a crash without any explicit error message and there are no way to catch this crash to resume/continue.
Therefore a Python script running beforehand can parse the Fortran namelist file and do operations on it using tools available in Python.
A check against some metadata describing the namelist format can also be done before the actual Fortran program runs. Options value can be passed to other program/scrips.
Also a single configuration file can be shared between a script and a Fortran program using the Fortran namelist format and this python class to retrieve the options value.