Package winappdbg :: Module textio :: Class Table
[hide private]
[frames] | no frames]

Class Table

source code


Text based table. The number of columns and the width of each column is automatically calculated.

Instance Methods [hide private]
 
__init__(self, sep=' ')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
addRow(self, *row)
Add a row to the table.
source code
 
justify(self, column, direction)
Make the text in a column left or right justified.
source code
str
getOutput(self)
Get the text output for the table.
source code
generator of str
yieldOutput(self)
Generate the text output for the table.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sep=' ')
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • sep (str) - Separator between cells in each row.
Overrides: object.__init__

addRow(self, *row)

source code 

Add a row to the table. All items are converted to strings.

Parameters:
  • row (tuple) - Each argument is a cell in the table.

justify(self, column, direction)

source code 

Make the text in a column left or right justified.

Parameters:
  • column (int) - Index of the column.
  • direction (int) - 1 to justify left, -1 to justify right.
Raises:
  • IndexError - Bad column index.
  • ValueError - Bad direction value.

getOutput(self)

source code 

Get the text output for the table.

Returns: str
Text output.

yieldOutput(self)

source code 

Generate the text output for the table.

Returns: generator of str
Text output.