def parse_config(configfile):
    """Parse the config file 'configfile' and return the parsed key-value pairs as dict"""
    return {k:v for k,v in map(lambda x: x.strip().split('='), filter(lambda x: not x.strip().startswith('#'), 
        (line for line in open(configfile))))}