nappy/utils/parse_config.py
def makeConfigDict(cf=config_file):
    """
    Parses config file and returns dictionary of sub-dictionaries
    for each section holding Keyword-Value pairs.
    """
    d = {}
    conf = MyCasePreservingConfigParser()
    conf.read(cf)

    # get all sections and content
    for section in conf.sections():
        d[section] = {}
        for item in conf.options(section):

            value = conf.get(section, item)
            if value.find("__space__") > -1:
                value = value.replace("__space__", " ")

            if item.find("&") > -1:
                item = tuple(item.split("&"))
            if value.find("&") > -1:
                value = tuple(value.split("&"))
            d[section][item] = value

    return d

    Parses config file and returns dictionary of sub-dictionaries
    for each section holding Keyword-Value pairs.
    
Parses config file and returns dictionary of sub-dictionaries
for each section holding Keyword-Value pairs.
Parses config file and returns dictionary of sub - dictionaries for each section holding Keyword - Value pairs .
def makeConfigDict(cf=config_file):
    d = {}
    conf = MyCasePreservingConfigParser()
    conf.read(cf)
    for section in conf.sections():
        d[section] = {}
        for item in conf.options(section):
            value = conf.get(section, item)
            if value.find("__space__") > -1:
                value = value.replace("__space__", " ")
            if item.find("&") > -1:
                item = tuple(item.split("&"))
            if value.find("&") > -1:
                value = tuple(value.split("&"))
            d[section][item] = value
    return d
def makeConfigDict ( cf = config_file ) : d = { } conf = MyCasePreservingConfigParser ( ) conf . read ( cf ) for section in conf . sections ( ) : d [ section ] = { } for item in conf . options ( section ) : value = conf . get ( section , item ) if value . find ( "__space__" ) > - 1 : value = value . replace ( "__space__" , " " ) if item . find ( "&" ) > - 1 : item = tuple ( item . split ( "&" ) ) if value . find ( "&" ) > - 1 : value = tuple ( value . split ( "&" ) ) d [ section ] [ item ] = value return d
Parses config file and returns dictionary of sub-dictionaries
for each section holding Keyword-Value pairs.
Parses config file and returns dictionary of sub - dictionaries for each section holding Keyword - Value pairs .
"""
    Parses config file and returns dictionary of sub-dictionaries
    for each section holding Keyword-Value pairs.
    """ # get all sections and content

cf