16 from .dataextractor
import DataExtractor
25 return [self.
align_rowalign_row(r)
for r
in rows]
28 for index, col
in enumerate(row):
29 if len(self.
_widths_widths) <= index:
31 row[index] = row[index].ljust(self.
_widths_widths[index])
38 _Aligner.__init__(self, [first_column_width])
44 _Aligner.__init__(self, self.
_count_widths_count_widths(first_column_width, table))
47 result = [first_column_width] + [len(h)
for h
in table.header[1:]]
49 for index, col
in enumerate(row[1:]):
51 if len(result) <= index:
52 result.append(len(col))
54 result[index] = max(len(col), result[index])
def __init__(self, first_column_width, table)
def _count_widths(self, first_column_width, table)
def __init__(self, first_column_width)
def align_rows(self, rows)
def align_rows(self, rows)
def __init__(self, widths=None)