# Path: eppy/results/readhtml.py
# class NotSimpleTable(Exception):
# def tdbr2EOL(td):
# def is_simpletable(table):
# def table_withcelltag_2matrix(table):
# def table2matrix(table):
# def table_withcelltag_2val_matrix(table):
# def table2val_matrix(table):
# def titletable(html_doc, tofloat=True):
# def _has_name(soup_obj):
# def lines_table(html_doc, tofloat=True):
# def _asciidigits(s):
# def _nospace(s):
# def _transpose(arr):
# def _make_ntgrid(grid):
# def named_grid_h(grid):
# def named_grid_v(grid):
# def cell2txt(td):


import copy
from io import StringIO
from eppy.results import readhtml
            break
    return "".join(tablelines)


def tablebyindex(filehandle, index):
    """fast extraction of the table using the index to identify the table

    This function reads only one table from the HTML file. This is in contrast to `results.readhtml.titletable` that will read all the tables into memory and allows you to interactively look thru them. The function `results.readhtml.titletable` can be very slow on large HTML files.

    This function is useful when you know which file you are looking for. It does not work with negative indices, like you can in a list. If you know a way to make negative indices work, do a pull request :-)

    Parameters
    ----------
    fhandle : file like object
        A file handle to the E+ HTML table file
    index: int
        This is the index of the table you are looking for

    Returns
    -------
    titleandtable : (str, list)
        - (title, table)
            - title = previous item with a <b> tag
            - table = rows -> [[cell1, cell2, ..], [cell1, cell2, ..], ..]
    """
    with filehandle:
        tableindex = 0
        for i in range(index + 1):
            thetable = get_upto_nexttable(filehandle)
    filehandle = StringIO(thetable)

# Path: eppy/results/readhtml.py
# class NotSimpleTable(Exception):
# def tdbr2EOL(td):
# def is_simpletable(table):
# def table_withcelltag_2matrix(table):
# def table2matrix(table):
# def table_withcelltag_2val_matrix(table):
# def table2val_matrix(table):
# def titletable(html_doc, tofloat=True):
# def _has_name(soup_obj):
# def lines_table(html_doc, tofloat=True):
# def _asciidigits(s):
# def _nospace(s):
# def _transpose(arr):
# def _make_ntgrid(grid):
# def named_grid_h(grid):
# def named_grid_v(grid):
# def cell2txt(td):


# Path: eppy/results/fasthtml.py
import copy
from io import StringIO
from eppy.results import readhtml

            break
    return "".join(tablelines)


def tablebyindex(filehandle, index):
    """fast extraction of the table using the index to identify the table

    This function reads only one table from the HTML file. This is in contrast to `results.readhtml.titletable` that will read all the tables into memory and allows you to interactively look thru them. The function `results.readhtml.titletable` can be very slow on large HTML files.

    This function is useful when you know which file you are looking for. It does not work with negative indices, like you can in a list. If you know a way to make negative indices work, do a pull request :-)

    Parameters
    ----------
    fhandle : file like object
        A file handle to the E+ HTML table file
    index: int
        This is the index of the table you are looking for

    Returns
    -------
    titleandtable : (str, list)
        - (title, table)
            - title = previous item with a <b> tag
            - table = rows -> [[cell1, cell2, ..], [cell1, cell2, ..], ..]
    """
    with filehandle:
        tableindex = 0
        for i in range(index + 1):
            thetable = get_upto_nexttable(filehandle)
    filehandle = StringIO(thetable)

    htables = readhtml.titletable(filehandle)