IMHO: NEVER touch the ConfigParser module, its obsolete (reads: obviously, not updated) and has quite a few quirks. API for comments? Forget it! Access to the section DEFAULT section? Lol! Interested in unassembled Config-Fields? Well guess that: ConfigParser iterates over all your configuration files and fails (obscures), perhaps EVENTUALLY makes a compressed Exception-Trace over ALL Errors. It is not easy to figure out which error belongs to the file. No nested configuration sections ...
Rather, CSV, and then ConfigParser!
IMO: use Json for configuration files. A very flexible, direct mapping between python data structures and the Json-String representation is possible and still accessible to people. Btw. the exchange between different languages ββis quite simple.
Curly-Braces in a file is not so pretty, but you can't do everything !; -)
source share