import string

def parse_cfg(cfg):
    fid = open(cfg,'r')
    lines = map(string.rstrip,fid.readlines())
    fid.close()
    ccontent = {}
    for line in lines:
        if '**' in line:
            continue
        elif '*' in line:
            kywd = line.partition('*')[-1]
            ccontent[kywd] = []
        else:
            ccontent[kywd].append(line)
    return ccontent
