loads our config object accessible via self.cfg
502233
def load_cfg(self):
        ''''''
        if self.cfg_mode == 'json':
            with open(self.cfg_file) as opened_file:
                return json.load(opened_file)
        else:
            with open(self.cfg_file) as ymlfile:
                return yaml.safe_load(ymlfile)
1173675
function (res, cfg) {
                var providerInstance = providerInstances[cfg.provider];
                providerInstance.load({
                    fn : this._retrieveMapInstance,
                    scope : this,
                    args : cfg
                });
            }
281004
def config_conf(obj):
    ""
    # If we ever want to add some default options this is where to do that
    cfg = {}
    for name in dir(obj):
        if name in CONFIG_PARSER_CFG: # argument of ConfigParser
            cfg[name] = getattr(obj, name)
    return cfg
187733
def _load_config(initial_namespace=None, defaults=None):
    # type: (Optional[str], Optional[str]) -> ConfigLoader
    
    # load defaults
    if defaults:
        config = ConfigLoader()
        config.update_from_object(defaults)

    namespace = getattr(config, 'CONFIG_NAMESPACE', initial_namespace)
    app_config = getattr(config, 'APP_CONFIG', None)

    # load customised config
    if app_config:
        if namespace is None:
            config.update_from_object(app_config)
        else:
            _temp = ConfigLoader()
            _temp.update_from_object(app_config, lambda key: key.startswith(namespace))
            config.update(_temp.namespace(namespace))

    return config
634473
def load_init_cfg
      cfg = {}
      if (cfg_file = AgentConfig.init_cfg_file) && (cfg_data = YAML.load(IO.read(cfg_file)))
        cfg = SerializationHelper.symbolize_keys(cfg_data) rescue nil
        fail("Cannot read configuration for agent #{cfg_file.inspect}") unless cfg
      end
      cfg
    end
536954
def load(self):
    
    try:
      if not self.__in_memory:
        self._json = json.loads(self._load_from_configs(self._main_config))
        # ToDo: make this via extension for root logger
        # self._log = aLogger.getLogger(__name__, cfg=self)  # reload logger using loaded configuration
        self._load_modules()
      else:
        self._json = {}
      # parse command line, currently used for re-assign settings in configuration, but can't be used as replacement
      self._load_from_commandline()
    except Exception as err:
      self._json = None
      raise
1168895
function loadConfig() {
  var root = process.cwd()
    , config = readConfig(path.join(root, '_config.json'));
  config.root = root;
  return config;
}
960483
def load_config(self, config_path=None):
        """"""
        if config_path is None:
            config_path = self.config_path
        else:
            self.config_path = config_path

        config = ConfigParser.SafeConfigParser(self.DEFAULT_SUBSTITUTIONS,
                                               allow_no_value=True)
        # Avoid the configparser automatically lowercasing keys
        config.optionxform = str
        self.initialize_config(config)
        try:
            with open(config_path) as f:
                config.readfp(f)
        except (IOError, ConfigParser.Error):
            _log.exception("Ignoring config from %s due to error.", config_path)
            return False

        self.config = config
        self.reload_modules()
        return True
141138
def load_config(cls, opts, path=None, profile=None):
        """"""
        if path and os.path.exists(path):
            if os.path.isdir(path):
                cls.config_searchpath.insert(0, path)
            else:
                cls.config_files.insert(0, path)

        config = cls.read_config()
        values = config.get("default", {})
        cls._load_values_into_opts(opts, values)

        if profile and profile != "default":
            values = config.get("profile:%s" % profile, {})
            cls._load_values_into_opts(opts, values)

        return values
643899
def init(self, *args):
        '''
        '''
        cfg = {}
        for k, v in self.options.items():
            if k.lower() in self.cfg.settings and v is not None:
                cfg[k.lower()] = v
        return cfg
1327105
def load_config(self, config=None):
        ''' 
        '''

        # Read the config file
        cfgname = (config or self.config_name)
        cfgname = 'sdsswork' if cfgname is None else cfgname
        assert isinstance(cfgname, six.string_types), 'config name must be a string'
        config_name = cfgname if cfgname.endswith('.cfg') else '{0}.cfg'.format(cfgname)
        self.configfile = os.path.join(self.treedir, 'data', config_name)

        assert os.path.isfile(self.configfile) is True, 'configfile {0} must exist in the proper directory'.format(self.configfile)

        self._cfg = SafeConfigParser()

        try:
            self._cfg.read(self.configfile.decode('utf-8'))
        except AttributeError:
            self._cfg.read(self.configfile)

        # create the local tree environment
        self.environ = OrderedDict()
        self.environ['default'] = self._cfg.defaults()
        # set the filesystem envvar to sas_base_dir
        self._file_replace = '@FILESYSTEM@'
        if self.environ['default']['filesystem'] == self._file_replace:
            self.environ['default']['filesystem'] = self.sasbasedir
475648
def _loadConfiguration(self):
        
        configPath = os.path.join(self.path, "config")
        if not os.path.isdir(configPath):
            return

        config = Config(configPath)

        Config.mergeDictionaries(config.getData(), self.application.config)
1263490
def load_config(self):
        
        self.__config = {}

        # Parse sections, its options and put it in self.config.
        for section in self.sections:

            self.__config[section] = {}
            options = self.parser.options(section)

            # Parse options of each section
            for option in options:

                try:
                    opt = self.parser \
                        .get(section, option)
                    try:
                        self.__config[section][option] = literal_eval(opt)
                    except (SyntaxError, ValueError):
                        self.__config[section][option] = opt
                        self.log_output.append(
                            {"level": "debug",
                             "msg": "Option not literal_eval-parsable"
                                    " (maybe string): [{0}] {1}"
                                 .format(section, option)})

                    if self.__config[section][option] == -1:
                        self.log_output.append(
                            {"level": "debug",
                             "msg": "Skipping: [%s] %s" % (section, option)}
                        )
                except ConfigParser.NoOptionError as exc:
                    self.log_output.append(
                        {"level": "error",
                         "msg": "Exception on [%s] %s: %s"
                                % (section, option, exc)}
                    )
                    self.__config[section][option] = None
1253771
def load(self):
        """"""
        try:
            with open(self.config_file) as configfile:
                self.config = yaml.load(configfile)
        except TypeError:
            # no config file (use environment variables)
            pass
        if self.config:
            self.prefix = self.config.get('config_prefix', None)
        if not self.prefix:
            if os.getenv(self.config_prefix):
                self.prefix = os.getenv(self.config_prefix)
            else:
                for path in [
                    os.path.join(self.basepath, self.default_file),
                    os.path.join(self.config_root, self.default_file)
                ]:
                    if os.path.exists(path):
                        with open(path) as conf:
                            config = yaml.load(conf)
                            prefix = config.get(
                                self.config_prefix.lower(), None
                            )
                            if prefix:
                                self.prefix = prefix
                                break
150077
def load(self):
        """"""

        # Config files prior to 0.2.4 dor not have config version keys
        old_config = not self.cfg_file.Exists("config_version")

        # Reset data
        self.data.__dict__.update(self.defaults.__dict__)

        for key in self.defaults.__dict__:
            if self.cfg_file.Exists(key):
                setattr(self.data, key, self.cfg_file.Read(key))

        # Reset keys that should be reset on version upgrades
        if old_config or self.version != self.data.config_version:
            for key in self.reset_on_version_change:
                setattr(self.data, key, getattr(DefaultConfig(), key))
            self.data.config_version = self.version

        # Delete gpg_key_uid and insert fingerprint key

        if hasattr(self.data, "gpg_key_uid"):
            oldkey = "gpg_key_uid"
            delattr(self.data, oldkey)
            newkey = "gpg_key_fingerprint"
            setattr(self.data, newkey, getattr(DefaultConfig(), newkey))
921161
def load(self, local='localsettings.py', default='settings.py'):
        '''
        
        '''
        self._load_defaults(default)
        self._load_custom(local)

        return self.settings()
1019173
def loads(self, config_str, as_defaults=False):
        
        self._rw.load_config_from_string(self._config, config_str, as_defaults=as_defaults)