Replacement for ConfigParser (was Re: ConfigParser and .ini files)

throwaway1 at my-deja.com throwaway1 at my-deja.com
Mon Jan 24 09:40:56 EST 2000


> "Fred L. Drake, Jr." wrote:

> > super_banane at yahoo.com writes:
> >  > The ConfigParser class in the default
Python libraries
> >  > does not support comments given on the
value lines, separated
> >  > by a semicolon, such as:
> >  >
> >  > [Section]
> >  > keyword = value ; put your comments here
> >
> >   You're right, it doesn't.
> >   Does anyone know of a *real* specification
for the .ini format?  I
> > didn't know this was allowed.

I've written a GPL'ed replacement for
ConfigParser, called ConfParser.  It doesn't allow
the dictionary formatting, but it does sensibly
allow comments just about wherever you'd like.  It
also removes most of the restrictions on what
characters can be in a section or option name.

It's available at:
http://www.qcc.sk.ca/~charlesc/software/

It mostly follows the interface from ConfigParser,
but doesn't have some of the convenience methods
of the original.

Charles Cazabon
<software at discworld.dyndns.org>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list