def load_settings(globals):
    """Loads settings from the configuration file into the caller's locals
    dict. This is intended to be used from within a Django settings.py to load
    dynamic settings like this:
    >>> from opus.lib.conf import load_settings
    >>> load_settings()

    """
    try:
        settings_file = os.environ["OPUS_SETTINGS_FILE"]
        if not settings_file:
            raise KeyError()
    except __HOLE__:
        raise ImportError("Cannot find Opus settings file, OPUS_SETTINGS_FILE was undefined")
    try:
        with open(settings_file,'r') as f:
            objs = json.load(f)
    except IOError, e:
        print repr(settings_file)
        raise
    # Encode all strings, see docstring explanation in recurse_encode
    objs = recurse_encode(objs)

    for name, value in objs.iteritems():
        globals[name] = value
dataset/ETHPy150Open bmbouter/Opus/opus/lib/conf/__init__.py/load_settings