I've just built a configuration file parser in python, it is built upon augeas (http://augeas.net) to allow direct access from python to their lens parsers.
It allows you to parse de file, modify the data and render it back to its original form without loosing any additional data like comments.
Hope you like it!
Heracles a Python configuration file parser for unix systems. | Heykuki News