[Python-ideas] Fwd: argparse - add support for environment variables
Michael Foord
fuzzyman at gmail.com
Wed Feb 20 20:18:25 CET 2013
On 20 February 2013 06:59, Vito De Tullio <vito.detullio at gmail.com> wrote:
> Eli Bendersky wrote:
>
> > In general, I'm -1 on the idea. argparse is for parsing command line
> > arguments. Python provides you convenient access to env vars via
> > os.environ. Why mix up the two?
>
> well, command line arguments, environmental variables and, I add,
> configuration files are commonly intertwined.
>
> While argparse focus on the first one, there are cases where you want some
> "layer" on top of it and on os.environ and on... ConfigParser?) to DRY.
>
>
configglue combines support for config files (and hierarchies of config
files) with command line arguments.
https://pypi.python.org/pypi/configglue/
Michael
> --
> ZeD
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
--
http://www.voidspace.org.uk/
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130220/73d15aa1/attachment.html>
More information about the Python-ideas
mailing list