I am a newbie with Python and I search how to parse a .txt file. My .txt file is a namelist with computation informations like :
myfile.txt
I personally solved this by creating a .py file that just contains all the parameters as variables - then did:
include PARAMETERS.py
in the program modules that need the parameters.
It's a bit ugly, but VERY simple and easy to work with.