def parse_config():
    parser = ConfigParser.RawConfigParser()
    parser.read(["/opt/push/etc/push.ini", os.path.expanduser("~/.push.ini")])

    config = attrdict()
    for name, section_parser in SECTIONS.iteritems():
        is_required = getattr(section_parser, "required", True)
        if is_required or parser.has_section(name):
            prefix = getattr(section_parser, "prefix", None)
            parsed = section_parser(parser)
            if not prefix:
                config[name] = parsed
            else:
                unprefixed = name[len(prefix) + 1:]
                config.setdefault(prefix, attrdict())[unprefixed] = parsed

    return config
Renders a template with the main layout and nav bar.
dataset/ETHPy150Open reddit/push/push/config.py/parse_config--crossover with--dataset/ETHPy150Open AppScale/appscale/AppDashboard/dashboard.py/AppDashboard.render_page