import csv


def csv2dict(fname):
	"""
    read a csv file to a dict when keys and values are
    separate by a comma

    Parameters
    ----------
    fname: csv fname with two columns separated by a comma

    Returns
    -------
    a python dictionary

    """
	reader = csv.reader(open(fname, 'r'))
	d = {}
	for row in reader:
		k, v = row
		d[k] = v
	return d