[Python-Dev] ConfigParser with a single section
Martin v. Loewis
08 Nov 2002 09:09:31 +0100
email@example.com (Peter Funk) writes:
> a typical Linux system is populated with a lot of "sectionless"
> config files in /etc/sysconfig. With the proposed change
> ConfigParser would be able to read these files.
These are really shell scripts, right? I doubt ConfigParser could read
those in their full generality, since it does not support # comments
except in column 1.
However, in most cases, such files can be easily read with execfile,
passing an empty dictionary.
> The concept of sections is in fact an additional mental model
> only needed for more complicated configuration files.
Indeed, these are the files implemented in ConfigParser.