Load the config from the config file or template.
422763
def load_config(self):
        """"""
        config = Config()
        self.config_obj = config.load('awsshellrc')
        self.config_section = self.config_obj['aws-shell']
        self.model_completer.match_fuzzy = self.config_section.as_bool(
            'match_fuzzy')
        self.enable_vi_bindings = self.config_section.as_bool(
            'enable_vi_bindings')
        self.show_completion_columns = self.config_section.as_bool(
            'show_completion_columns')
        self.show_help = self.config_section.as_bool('show_help')
        self.theme = self.config_section['theme']
592409
def load_config(filename="logging.ini", *args, **kwargs):
    
    logging.config.fileConfig(filename, *args, **kwargs)
659720
def _load_config(self):
        """"""
        self._config = ConfigParser.SafeConfigParser()
        self._config.read(self.config_path)
923438
private function loadConfiguration()
    {
        $allFiles = File::allFiles('_automate');

        foreach ( $allFiles as $file )
            if( strpos((string)$file, '.done') === false )
                $this->configurationData[] = $this->optimizeData($file);

    }
111978
def _loadConfig(self):
        
        configPath = path.join(self._getConfigPath(), self._name + ".yml")
        if os.path.exists(configPath):
            self.logger.warning("Loading config from " + configPath)
            with open(configPath, 'r') as yml:
                return yaml.load(yml, Loader=yaml.FullLoader)
        defaultConfig = self.loadDefaultConfig()
        self._storeConfig(defaultConfig, configPath)
        return defaultConfig
268473
def load(filename):
    '''
    

    '''
    filepath = findConfigFile(filename)
    prop= None
    if (filepath):
        print ('loading Config file %s' %(filepath))

        with open(filepath, 'r') as stream:
            cfg=yaml.load(stream)
            prop = Properties(cfg) 
    else:
        msg = "Ice.Config file '%s' could not being found" % (filename)
        raise ValueError(msg)

    return prop
643617
def load_user():
    """"""
    config_path = get_user_config_path()
    config = {}

    # TODO: This may be overkill and too slow just for reading a config file
    with open(config_path) as f:
        code = compile(f.read(), config_path, 'exec')
    exec(code, config)

    keys = list(six.iterkeys(config))
    for k in keys:
        if k.startswith('_'):
            del config[k]

    return config
751433
protected function loadConfig() {
		$app_root = Registry::getInstance()->app_root;
		if (file_exists($app_root . '/Application/config.php')) {
			require_once $app_root . '/Application/config.php';
		}

		if (file_exists($app_root . '/Application/localconfig.php')) {
			require_once $app_root . '/Application/localconfig.php';
		}

		if (isset($config)) {
			Registry::getInstance()->config = $config;
		} else {
			Registry::getInstance()->config = [];
		}
	}
357255
def load_template(self, template: str) -> Template:
        """"""
        env = dict(trim_blocks=True, lstrip_blocks=True, keep_trailing_newline=False)
        jinja2_ext = ".jinja2"
        if not template.endswith(jinja2_ext):
            self._log.error("Template file name must end with %s" % jinja2_ext)
            raise ValueError
        if not template[:-len(jinja2_ext)].endswith(".md"):
            self._log.error("Template file should be a Markdown file.")
            raise ValueError
        if not os.path.isabs(template):
            template = os.path.join(os.path.dirname(__file__), template)
        with open(template, encoding="utf-8") as fin:
            template_obj = Template(fin.read(), **env)
        template_obj.filename = template
        self._log.info("Loaded %s", template)
        return template_obj
1293465
def load():
    
    config = ConfigParser.RawConfigParser(DEFAULTS)
    config.readfp(open(CONF_PATH))
    for section in config.sections():
        globals()[section] = {}
        for key, val in config.items(section):
            globals()[section][key] = val
464677
def load_deploy_config(deploy_filename, config=None):
    '''
    
    '''

    if not config:
        config = Config()

    if not deploy_filename:
        return

    if path.exists(deploy_filename):
        extract_file_config(deploy_filename, config)

    return config
537224
def _load(self, config):
        
        if isstring(config):
            self.filename = config
            params = yaml.load(open(config))
        elif isinstance(config, Config):
            # This is the copy constructor...
            self.filename = config.filename
            params = copy.deepcopy(config)
        elif isinstance(config, dict):
            params = copy.deepcopy(config)
        elif config is None:
            params = {}
        else:
            raise Exception('Unrecognized input')

        return params
711068
public function loadConfig()
    {
        $fileName = $this->getPath() . DIRECTORY_SEPARATOR . 'config/config.php';
        if(is_file($fileName))
        {
            $name = '@' . $this->moduleName;
            Config::removeConfig($name);
            Config::addConfig($name, include $fileName);
        }
    }
1150549
def load(cls, filename=None):
        """"""
        if filename is None:
            LOGGER.debug("Loading default configuration.")
            with open_text(templates, "test_config.yml",
                           encoding="utf-8") as file_handle:
                content = yaml.load(file_handle)
        else:
            LOGGER.debug("Loading custom configuration '%s'.", filename)
            try:
                with open(filename, encoding="utf-8") as file_handle:
                    content = yaml.load(file_handle)
            except IOError as err:
                LOGGER.error(
                    "Failed to load the custom configuration '%s'. Skipping.",
                    filename)
                LOGGER.debug(str(err))
                content = dict()
        return cls(content)
798581
def load(self):
        """"""
        try:
            merged_configfile = self.get_merged_config()
            self.yamldocs = yaml.load(merged_configfile, Loader=Loader)

            # Strip out the top level 'None's we get from concatenation.
            # Functionally not required, but makes dumps cleaner.
            self.yamldocs = [x for x in self.yamldocs if x]
            self.logdebug('parsed_rules:\n%s\n' % pretty(self.yamldocs))

        except (yaml.scanner.ScannerError, yaml.parser.ParserError):
            self.raise_and_log_error(ConfigError, 'error parsing config.')
955459
def config_loader(app, **kwargs):
    """"""
    app.config.from_object(Config)
    app.config.update(**kwargs)
518768
protected function loadConfig()
    {
        if (self::$config_path === null) {
            throw new \BadMethodCallException('Config path is null');
        }

        $key = "$this->cnab/$this->bank_code";

        if (!array_key_exists($key, self::$cache)) {
            $config_file = self::$config_path . "/cnab$key.yml";
            if (file_exists($config_file)) {
                self::$cache[$key] = Yaml::parseFile($config_file);
            } else {
                throw new \RuntimeException(sprintf(
                    "Config file for Bank '%s' in CNAB%s not found",
                    $this->bank_code,
                    $this->cnab
                ));
            }
        }

        $this->config = $key;
    }