Unix configuration files come in all shapes and forms. I know that Webmin has a Perl API that makes it easy to parse and modify most common configuration programmatically, while preserving changes that might have been made by hand.
Are there any other libraries that has similar functionality, perhaps for other languages (Python, Ruby, C, C++, etc)?