Re: ANN: New configuration module released
From: Neal Becker (ndbecker2_at_verizon.net)
Date: 11/04/04
- Next message: Maurice LING: "documenting PLYed parsers"
- Previous message: Anthony Baxter: "RELEASED Python 2.4, beta 2"
- Maybe in reply to: Vinay Sajip: "ANN: New configuration module released"
- Next in thread: Vinay Sajip: "Re: New configuration module released - command line options"
- Reply: Vinay Sajip: "Re: New configuration module released - command line options"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: python-list@python.org Date: Wed, 03 Nov 2004 18:47:35 -0500
Vinay Sajip wrote:
> Neal D. Becker wrote:
>> Looks good so far.
>>
>> 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.
>>
>
> Python already has the optparse module for command-line options, and
> it's pretty good. I'll be looking at ways in which access to
> command-line options parsed via optparse can be made available through
> the config API, without duplication of code.
>
The point is, you would like to specify the options once, and use this
single specification for all option sources - instead of redundantly having
to specify that there is a 'verbosity' option that takes a value of 'int'
and has a default of 'whatever', and do this once (and with different
syntax) for each source - config files, command line, etc.
- Next message: Maurice LING: "documenting PLYed parsers"
- Previous message: Anthony Baxter: "RELEASED Python 2.4, beta 2"
- Maybe in reply to: Vinay Sajip: "ANN: New configuration module released"
- Next in thread: Vinay Sajip: "Re: New configuration module released - command line options"
- Reply: Vinay Sajip: "Re: New configuration module released - command line options"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|