Neal Becker wrote:

> Right now we have 2 rather different stdlib modules for parsing options
> from
> ini-style files and from command line.  I believe it would be desirable to
> have one module that can handle both.  Is there interest in pursuing this
> idea?

Can python learn from c++?  Maybe sometimes.  I think the design of
boost::program_options is a pretty example. 

http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/program_options.html

The basic design is split into 3 components:
 * Options Description
 * Parsers
 * Storage 

One of the benefits of this separation is that various parsers can be
plugged in.  The library includes 3 parsers:
 * Command line
 * ini-file
 * environment variables

IMO, this design would be a good starting point for a python library.

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to