def read_all(path, encoding='<STR_LIT>'):
assert isinstance(path, (str, _oldstr))<EOL>data = []<EOL>with smart_open_read(path, mode='<STR_LIT:rb>', try_gzip=True) as fh:<EOL><INDENT>reader = csv.reader(fh, dialect='<STR_LIT>', encoding=encoding)<EOL>for l in reader:<EOL><INDENT>data.append(tuple(l))<EOL><DEDENT><DEDENT>return data<EOL>
Reads a tab-delimited text file.

    The file can either be uncompressed or gzip'ed.

    Parameters
    ----------
    path: str
        The path of the file.
    enc: str, optional
        The file encoding.

    Returns
    -------
    List of (tuple of str)
        A list, which each element containing the contents of a row
        (as a tuple).