Package gavo :: Package votable :: Module tablewriter
[frames] | no frames]

Module tablewriter

source code

Writing tabular data within VOTables.

Classes
  OverflowElement
A container for VOTable elements that are written when it is likely that a query has overflowed the limit.
Functions
 
write(root, outputFile, xmlDecl=True)
writes a VOTable to outputFile.
source code
 
asString(root, xmlDecl=False)
returns the V.VOTABLE root as a string.
source code
 
DelayedTable(tableDefinition, rowIterator, contentElement, overflowElement=None, **attrs)
returns tableDefinition such that when serialized, it contains the data from rowIterator
source code
Variables
  __package__ = 'gavo.votable'
Function Details

write(root, outputFile, xmlDecl=True)

source code 

writes a VOTable to outputFile.

This is a compatiblity function that's in this place mainly for historical reasons. It's basically stanxml.write, except that the prefix of the root element will be the empty prefix.

DelayedTable(tableDefinition, rowIterator, contentElement, overflowElement=None, **attrs)

source code 

returns tableDefinition such that when serialized, it contains the data from rowIterator

rowIterator is an iterator yielding all rows from the table to be encoded, tableDefinition is the TABLE element, and ContentElement is one of the permitted DATA children from VOTable.

See the OverflowElement class for overflowElement.

attrs are optional attributes to the content element.