I am writing a Python code which needs to interoperate with C code which I also wrote. In C I have a section like
#define FOO 23 // whatever
#define BAR 54.3 // something else
I want to use these in python (as regular variables is fine). I am not finding anything in my web searches, and I could easily write a parser myself, but.... I can't believe I am the first one with such a need. PyPreprocessor comes close, but not exactly.
Is there a obvious way to do so which I am missing?