[Python-ideas] Fwd: argparse - add support for environment variables

Vito De Tullio vito.detullio at gmail.com
Wed Feb 20 07:59:18 CET 2013


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.

-- 
ZeD





More information about the Python-ideas mailing list