unified command line args, environment variables, .conf file settings.

andrej.panjkov at climatechange.qld.gov.au andrej.panjkov at climatechange.qld.gov.au
Wed May 7 20:45:06 EDT 2008


On May 3, 12:16 pm, smitty1e <smitt... at gmail.com> wrote:
> Just a fun exercise to unify some of the major input methods for a
> script into a single dictionary.
> Here is the output, given a gr.conf file in the same directory with
> the contents stated below:
>


How about extending this to include other sources of control inputs.
I think a reasonable heirarchy is:

Interactive Input
 > Command Line Argument
  > Command Line Input File
   > Environment Variables
    > Local Defaults File
     > System Wide Defaults File
      > Installation Defaults File
       > 'Factory' Defaults File
        > In-Code Initialization Defaults



More information about the Python-list mailing list