def read_tsv(filepath, delimiter="\t", max_splits=-1):
  """Read file to list of rows."""
  rows = []
  with gfile.GFile(filepath, "r") as tsv_file:
    for line in tsv_file:
      line = line.rstrip()
      cols = line.split(delimiter, max_splits)
      rows.append(cols)
  print("Loaded %s rows from %s." % (len(rows), filepath))
  return rows
Read file to list of rows.
language/quest/common/tsv_utils.py