[Chandler-dev] command line options handling change
vajda at osafoundation.org
Thu Jan 4 10:01:21 PST 2007
To make it a little simpler to write simple scripts against Chandler code, I
changed command line options initializing in the following ways:
- importing application.Globals now initializes Globals.options to the
defaults defined in application.Utility's COMMAND_LINE_OPTIONS dict.
- options that are defined to have their default be set via an environment
variable are defaulted that way also when only importing
- boolean options that are defined to have their default be set via an
environment variable are defaulted to True if their env var is present
in the environment regardless of their actual value.
In other words, by only importing Globals and not calling
Utility.initOptions(), which parse Chandler's command line
args, Globals.options is now initialized to the default values
set in Utility's COMMAND_LINE_OPTIONS dir.
Whether calling Utility.initOptions() or not, environment variables, when set,
still override the defaults set in Utility's COMMAND_LINE_OPTIONS dict.
More information about the chandler-dev