Re: ANN: New configuration module released

From: Neal Becker (ndbecker2_at_verizon.net)
Date: 11/04/04


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.



Relevant Pages

  • Re: ANN: New configuration module released
    ... options is seperated from the rest of the design. ... I believe a decent config module should at least handle both config files ... and command line options. ... ENV variables are a nice touch too. ...
    (comp.lang.python)
  • Re: ANN: New configuration module released
    ... > options is seperated from the rest of the design. ... > I believe a decent config module should at least handle both config files ... > and command line options. ... ENV variables are a nice touch too. ...
    (comp.lang.python)
  • Re: More beginner help needed
    ... But the design decision lies in what to accomplish, ... >> not in how to pronounce the command once you have decided. ... >> They have the same semantic choices available to them as I do. ... don't hallucinate. ...
    (comp.os.linux.misc)
  • Re: Library Design, f0dders nightmare.
    ... Lousy code design is imposing ... avoid a buffer limitation and the claim of being a general purpose ... Yes but you can tell the difference of imposing an ancient architecture ... many applications can simply do teir command line ...
    (alt.lang.asm)
  • Re: Ping Kevin Aylward - re your "scientific paper"
    ... > Religious and political views contrary to your own, a poor command of ... I do not have a "poor" command of the English language in the slightest. ... Waveform Display, FFT's and Filter Design. ...
    (sci.electronics.design)