Getopt: Using Environment Var To Override

Tim Daneliuk tundra at tundraware.com
Sat Jan 4 02:20:07 EST 2003


Skip Montanaro wrote:
>     Tim> I currently use getopt to process my command line args.  Is there
>     Tim> some standard/easy/idiomatic/Pythonic way to supplement this with
>     Tim> an environment variable?  
> 
> None that I'm aware of, however depending on how your environment variable
> is formatted it might be trivial tack it onto the front or back of the args
> you pass to getopt.  Suppose you require your environment variable value to
> look like a set of arguments.  It could be as simple as

Thanks, this is more-or-less what I concluded as well...


-- 
------------------------------------------------------------------------------
Tim Daneliuk
tundra at tundraware.com





More information about the Python-list mailing list