This is something I wanted before (as well as loading defaults from per user config files). A solution was proposed a while back, but it was never merged due to a lack of consensus on the API: http://code.google.com/p/argparse/issues/detail?id=35 Not sure if there is a more recent discussion. ________________________________________ From: Python-ideas [python-ideas-bounces+moloney=ohsu.edu@python.org] On Behalf Of Miki Tebeka [miki.tebeka@gmail.com] Sent: Tuesday, February 19, 2013 3:51 PM To: python-ideas@googlegroups.com Cc: python-ideas Subject: Re: [Python-ideas] Fwd: argparse - add support for environment variables Why not: parser.add_argument('--spam', default=os.environ.get('SPAM', 7)) Mainly because then you can't swap in different dictionaries to resolve SPAM (when specifying "env" to ArgumentParser). The other reason is that it's making common code shorter, which is a win IMO.