solvebio/utils/tabulate.py
def _build_row(cells, padding, begin, sep, end):
    "Return a string which represents a row of data cells."

    pad = " " * padding
    padded_cells = [pad + cell + pad for cell in cells]

    # SolveBio: we're only displaying Key-Value tuples (dimension of 2).
    #  enforce that we don't wrap lines by setting a max
    #  limit on row width which is equal to TTY_COLS (see printing)
    rendered_cells = (begin + sep.join(padded_cells) + end).rstrip()
    if len(rendered_cells) > TTY_COLS:
        if not cells[-1].endswith(" ") and not cells[-1].endswith("-"):
            terminating_str = " ... "
        else:
            terminating_str = ""
        rendered_cells = "{0}{1}{2}".format(
            rendered_cells[:TTY_COLS - len(terminating_str) - 1],
            terminating_str, end)

    return rendered_cells
def _build_row(cells, padding, begin, sep, end):
    "Return a string which represents a row of data cells."

    pad = " " * padding
    padded_cells = [pad + cell + pad for cell in cells]

    # SolveBio: we're only displaying Key-Value tuples (dimension of 2).
    #  enforce that we don't wrap lines by setting a max
    #  limit on row width which is equal to TTY_COLS (see printing)
    rendered_cells = (begin + sep.join(padded_cells) + end).rstrip()
    if len(rendered_cells) > TTY_COLS:
        if not cells[-1].endswith(" ") and not cells[-1].endswith("-"):
            terminating_str = " ... "
        else:
            terminating_str = ""
        rendered_cells = "{0}{1}{2}".format(
            rendered_cells[:TTY_COLS - len(terminating_str) - 1],
            terminating_str, end)

    return rendered_cells
Return a string which represents a row of data cells.