parser.add_argument("--verbose", default = False, action="store_true") args = parser.parse_args() ######## ###### #### TAKE CARE OF CONTEXT IN A GLOBAL WAY ### @@NOTE: the issue is, we don't want to, nor do we have arguments ### : for, passing context through the system. Instead we take ### : advantage of the ability to set the current default context. ### : This necessitates setting the context string prior to importing ### : anything that uses the ConfigSpace or Lookups modules. from astrodata import ConfigSpace if args.context: ConfigSpace.set_current_default_context(args.context) print "setting context='%s' (dw142)" % args.context from astrodata.adutils.dwutil.dwsettings import package_classes from astrodata.adutils.dwutil.dwsettings import warehouse_packages from astrodata.adutils.dwutil.dwsettings import dataset_extensions # this relies on ConfigSpace, and therefore context # AGAIN: the point is we have to be careful to set the context before # any modules use the ConfigSpace or Lookups modules. from astrodata.adutils.dwutil import daemon_process as dp ### #### ###### ########