def tsv(infile, comment=None):
    """ Returns a generator for tab-delmited file.

    Args:
        infile: Input file as a file-like object
        comment (str): Rows beginning with this string will be ignored.

    Returns:
        generator: A generator that yields each row in the file as a list.

    """
    if comment is None:
        return (l.strip('\n').split('\t') for l in infile)
    else:
        return (l.strip('\n').split('\t') for l in infile if not l.startswith(comment))