Table

This module contains the definition of a summary table. It has the definition of the Table that creates a output with a table format provided by PrettyTable.

Example

Creating a table:

table = Table()
class gsf.core.debug.infrastructure.table.Table

Bases: gsf.core.debug.domain.summary_table.SummaryTable

Creates a table using Pretty Table

_table

Created table.

Type

PrettyTable

add_row(row: List[Any])gsf.core.debug.infrastructure.table.Table

Adds a row to the table

Parameters

row – Row to be added.

build()str

Returns the table in string format

set_alignment(align: List[str])gsf.core.debug.domain.summary_table.SummaryTable

Sets the alignment of the columns

Parameters

align – Alignment of each column.

set_labels(labels: List[str])gsf.core.debug.infrastructure.table.Table

Sets the labels of the table

Parameters

labels – Fields of the table.

set_title(title: str)gsf.core.debug.infrastructure.table.Table

Sets the title of the table

Parameters

title (str) – Title of the table.