ANN: New configuration module released

Anthony Baxter anthonybaxter at gmail.com
Sun Nov 7 10:53:53 EST 2004


On Wed, 03 Nov 2004 15:26:07 -0500, Neal D. Becker
<ndbecker2 at verizon.net> wrote:
> The boost c++ library (about to be released) has a new program_options
> parser.  One feature I appreciate in the design, is that the source of
> options is seperated from the rest of the design.  This means that, out of
> the box, it reads options from command line, from config files, and from
> env variables.  Probably not hard to extend if anyone could think of a
> reason.
> 
> I believe a decent config module should at least handle both config files
> and command line options.  ENV variables are a nice touch too.

I did something similar in shtoom (see the svn repo) - you provide
definitions of the options, and it builds up optparse, configparser,
and GUI preferences dialogs for them. Options provided are then stored
in the configparser file format, so you don't have to re-enter them
each time.



More information about the Python-list mailing list