[Python-Dev] ConfigParser with a single section

Peter Funk pf@artcom-gmbh.de
Fri, 8 Nov 2002 08:12:42 +0100 (CET)


Hi,

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. 

The concept of sections is in fact an additional mental model
only needed for more complicated configuration files.  
So if we think of sections as an additional feature the proposed
change could even simplify the mental model for starters.  

Gustavo:
> Besides that, I'm ashamed to say that I'm acting more like a bug-closing
> monkey. ;-)

Gustavo:
I appreciate your championship of this and I believe it will
improve the range of applications for this library module.

I didn't actually had a look at your patch yet. 

That said I believe a "sectionless" config file could be parsed 
into the DEFAULT section.  Some methods (for example .options() )
could accept None as a section argument accessing the default
section.

If you include a doc patch, please don't forget to add the
\versionchanged[...foo...]{2.3} calls.  

Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen, Germany)