Did I find the right examples for you? yes no

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Uses ConfigParser to parse core.cfg configuration file

        def parse_config():
    """Uses ConfigParser to parse core.cfg configuration file"""

    config = {}
    parser = ConfigParser()
    for (k, v) in parser.items('Main'):
        config[k] = v
    return config

src/r/e/rejourn-HEAD/core.py   rejourn(Download)
        # First patse the config and extract data from infile
        self.inpath = inpath
        self.config = util.parse_config()
        with open(inpath) as infh:
            raw_header, self.content = infh.read().split('\n' + self.config.get('separator', '---') + '\n', 1)
    def __init__(self, name, target_list, rss = False):
        """Index builder"""
        self.config = util.parse_config()
        self.name = name

src/r/e/rejourn-HEAD/tests.py   rejourn(Download)
    def test_parse_config(self):
        config = util.parse_config()
        assert config.get('indir', None)
        assert config.get('outdir', None)