Printer
source: bluebase/core/printer.py
- class Printer(stream: TextIO, attrs: Sequence[tuple[str | None, str]], max_width: int = 16)[source]
Bases:
objectA printer for result tables.
Rows are buffered internally and printed together when
flushis called.- Variables:
stream (TextIO) – the output stream
max_width (int) – the maximum width of a column
columns (list[tuple[str, int]]) – the list of columns
rows (list[tuple[Any, ...]]) – the rows currently in the buffer
- Raises:
ValueError – if the maximum width is too small
- MIN_WIDTH: ClassVar[int] = 3
The minimum width of a column.