Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
Returns the dict corresponding to the configuration file.
    

        def get_config_file(arg_attrs, config_name):
    """ Returns the dict corresponding to the configuration file.
    """

    filename = get_config_path(arg_attrs, config_name)
    if not filename:
        raise ConfigException("Failed to retrieve the configuration filepath.")

    try:
        parser = RawConfigParser()
        parser.read(filename)

        file_attrs = {}
        for section in parser.sections():
            file_attrs[section] = dict(parser.items(section))

        return file_attrs
    except ConfigParserError:
        raise ConfigException("Failed to parse the configuration file: %s " %
                              filename)
        


src/b/a/baboon-0.1.4/baboon/baboond/config.py   baboon(Download)
import argparse
import logging
import logging.config
 
from baboon.common.config import get_config_args, get_config_file
 
    arg_attrs = get_config_args(PARSER)
    file_attrs = get_config_file(arg_attrs, 'baboondrc')
    init_config_log(arg_attrs, LOGGING)
 

src/b/a/baboon-HEAD/baboon/baboond/config.py   baboon(Download)
import argparse
import logging
import logging.config
 
from baboon.common.config import get_config_args, get_config_file
 
    arg_attrs = get_config_args(PARSER)
    file_attrs = get_config_file(arg_attrs, 'baboondrc')
    init_config_log(arg_attrs, LOGGING)
 

src/b/a/baboon-0.1.4/baboon/baboon/config.py   baboon(Download)
from baboon.baboon.fmt import cerr, cwarn, csuccess
from baboon.baboon.dictconf import LOGGING, PARSER
from baboon.common.config import get_config_args, get_config_file
from baboon.common.config import init_config_log
from baboon.common.errors.baboon_exception import ConfigException
 
    arg_attrs = get_config_args(PARSER)
    file_attrs = get_config_file(arg_attrs, 'baboonrc')
    init_config_log(arg_attrs, LOGGING)
 

src/b/a/baboon-HEAD/baboon/baboon/config.py   baboon(Download)
from baboon.baboon.fmt import cerr, cwarn, csuccess
from baboon.baboon.dictconf import LOGGING, PARSER
from baboon.common.config import get_config_args, get_config_file
from baboon.common.config import init_config_log
from baboon.common.errors.baboon_exception import ConfigException
 
    arg_attrs = get_config_args(PARSER)
    file_attrs = get_config_file(arg_attrs, 'baboonrc')
    init_config_log(arg_attrs, LOGGING)