I\'ve been looking for a simple answer to this question, but it seems that I can\'t find one. I would prefer to stay away from any external libraries that aren\'t already includ
I recommend using regular expressions (re
module) to parse the information you want out of the files.
Building a full C parser would be huge, but if you only use the variables and the file is reasonably simple/predictable/under control, then what you need to write is straightforward.
Just watch out for 'gotcha' artifacts such as commented-out code!