...
- Separation of parameter definition from script logic (i.e. tdrp's paramdef file).
- A separate paramdef file is optional (constrast examples 1 & 2 below)).
- Ability to easily generate a default parameter file (i.e --print_params capability). The documentation included in the file helps the new user to understand the use of the program and customize the parameters.
- Encapsulation of parameter handling logic (contained in the ConfigMaster class)
- Simple default behavior. If no parameter file is used, the default parameter values are used.
- Overriding of missing parameters with default values.
- Warning if you give a parameter in your config file that it doesn't expect.
- Automatic command line override for configuration parameters.
- Only for int, long, float, string, and bool types currently
- Self-documenting. All parameter documentation is done in the paramdef, therefore the documentation and code are co-located, making it easy to keep the documentation up-to-date.
- Support for environment variables in the parameter files.
- Other python code can also be included in the param files - date/time logic, file system logic, etc.
- Simple. Minimal coding required. Most work is done in the the paramdef file.
...
Repository Location
ConfigMaster for Python2.x is in cvs at libs/python/src/ConfigMaster
ConfigMaster for Python3 is in github at https://github.com/NCAR/ConfigMaster
Installation
Check out ConfigMaster.py from cvs and put it in a location that is in your $PYTHONPATH.
...