import csv


def dict_from_tsvfile(filename):
    """open a tab separated two column file, return it as a str->str dict"""

    d = {}
    with open(filename) as csvfile:
        reader = csv.reader(csvfile, delimiter='\t')
        for row in reader:
            d[row[0]] = row[1]

    return d