printtools/table.py
def __table_nosep(t, indent='', spacing='  ', hline=False, heading=False):
    """Table with no vertical dividers."""
    widths = __get_widths(t)
    hdiv = "-" * (sum(widths) + len(spacing) * (len(widths) - 1)) + "\n"

    tout = ''
    if hline:
        tout = hdiv

    for i, row in enumerate(t):
        row_contents = [
            cell + ' ' * (width - len(clear_fmt(cell)))
            for width, cell in zip(widths, row)]
        tout += indent + spacing.join(row_contents) + "\n"
        if hline or (heading and i == 0):
            tout += hdiv

    return tout
Table with no vertical dividers.
Table with no vertical dividers.
Table with no vertical dividers .
def __table_nosep(t, indent='', spacing='  ', hline=False, heading=False):
    widths = __get_widths(t)
    hdiv = "-" * (sum(widths) + len(spacing) * (len(widths) - 1)) + "\n"
    tout = ''
    if hline:
        tout = hdiv
    for i, row in enumerate(t):
        row_contents = [
            cell + ' ' * (width - len(clear_fmt(cell)))
            for width, cell in zip(widths, row)]
        tout += indent + spacing.join(row_contents) + "\n"
        if hline or (heading and i == 0):
            tout += hdiv
    return tout
def __table_nosep ( t , indent = '' , spacing = '  ' , hline = False , heading = False ) : widths = __get_widths ( t ) hdiv = "-" * ( sum ( widths ) + len ( spacing ) * ( len ( widths ) - 1 ) ) + "\n" tout = '' if hline : tout = hdiv for i , row in enumerate ( t ) : row_contents = [ cell + ' ' * ( width - len ( clear_fmt ( cell ) ) ) for width , cell in zip ( widths , row ) ] tout += indent + spacing . join ( row_contents ) + "\n" if hline or ( heading and i == 0 ) : tout += hdiv return tout
Table with no vertical dividers.
Table with no vertical dividers .
"""Table with no vertical dividers."""
t
indent
spacing
hline
heading