Package PyFoam :: Package Basics :: Module RestructuredTextHelper :: Class ReSTTable
[hide private]
[frames] | no frames]

Class ReSTTable

source code


Class that administrates a two-dimensional table and prints it as a restructured text-table when asked

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__setitem__(self, index, value)
Sets an item of the table
source code
 
__str__(self)
Output the actual table
source code
 
addLine(self, val=None, head=False)
Add a line after that row
source code
 
setElement(self, row, col, value)
Sets a specific element
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__setitem__(self, index, value)
(Index assignment operator)

source code 

Sets an item of the table

Parameters:
  • index - a tuple with a row and a column. If it is a single integer then the row is assumed
  • value - the value to set. If only the row was specified it is a list with the column values

__str__(self)
(Informal representation operator)

source code 

Output the actual table

Overrides: object.__str__

addLine(self, val=None, head=False)

source code 

Add a line after that row

Parameters:
  • val - the row after which to add. If None a line will be added after the current last row

setElement(self, row, col, value)

source code 

Sets a specific element

Parameters:
  • row - the row
  • col - column
  • value - the used value