Package pycocoa :: Module tables :: Class Table
[frames] | no frames]

Class Table

  object --+            
           |            
bases._Type0 --+        
               |        
    bases._Type1 --+    
                   |    
        bases._Type2 --+
                       |
                      Table

Python Type table of rows and columns, wrapping an ObjC NSTableView.

Instance Methods
 
__init__(self, *headers)
New Table.
 
append(self, *cols)
Append another row of column values.
 
close(self)
Close and release this table.
 
display(self, title, width=600, height=400)
Show the table in a scrollable window.
 
separator(self)
Append a row separator, an empty row.

Inherited from bases._Type2: __str__

Inherited from bases._Type0: __repr__, type2strepr

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

Properties

Inherited from bases._Type2: tag, title

Inherited from bases._Type1: NSdelegate, app

Inherited from bases._Type0: NS

Inherited from object: __class__

Method Details

__init__(self, *headers)
(Constructor)

 

New Table.

Parameters:
  • headers - Column headers (str), either just the "title" or "title:width" to specify the column width (int or float).
Overrides: object.__init__

display(self, title, width=600, height=400)

 

Show the table in a scrollable window.

Parameters:
  • title - Window title (str).
  • width - Window frame width (float or int).
  • height - Window fram height (float or int).
Returns:
The window (TableWindow).
Raises:
  • ValueError - Invalide header "title:width".