def config_parser(cfg_name):
    """
    Extract a dictionary of information from a given config. file
    """

    config_params = {}
    with open(str(cfg_name)) as cfile:
        for line in cfile.readlines():
            sline = line.split("=")
            attr = sline[0].rstrip()
            par = sline[1].rstrip().lstrip()
            if attr == 'flags':
                config_params['flags'] = par.split(',')
            else:
                config_params[attr] = par

    return(config_params)