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

Class Table


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
 
addRow(self, *row)
Add a row to the table.
 
justify(self, column, direction)
Make the text in a column left or right justified.
str
getOutput(self)
Get the text output for the table.
generator of str
yieldOutput(self)
Generate the text output for the table.

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)

 

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)

 

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)

 

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)

 

Get the text output for the table.

Returns: str
Text output.

yieldOutput(self)

 

Generate the text output for the table.

Returns: generator of str
Text output.