gavo.formats.texttable module

Writing data as plain text.

Currently, we only do TSV. It would probably be nice to support “formatted ASCII as well, though that may be a bit tricky given that we do not really store sane formatting hints for most columns.


maps JD, MJD, unix timestamp, and julian year columns to human-readable datetimes.


returns a list of tuples for a tab-separated-values file.

Lines starting with # and lines containing only whitespace are ignored. Whitespace at front and back is stripped.

No checks are done at this point, i.e., the tuples could be of varying lengths.

gavo.formats.texttable.renderAsColumns(table, target, acquireSamples=False)[source]

writes a fixed-column representation of table to target.

gavo.formats.texttable.renderAsText(table, target, acquireSamples=True)[source]

writes a text (TSV) rendering of table to the file target.