def list_from_file(file):
    """ Returns a list of tuples object based on a file of pipe-delimited key/value pairs """
    l = []
    with open(file) as f:
        for line in f:
            if not line.startswith('#') and line.strip():
                line = line.strip()
                (key, val) = line.split('|')[:2]
                l.append((str(key),val))
    return l