A format and tool set for encoding line-based records into white-space-separated tokens and for decoding such records.
>>> True
True
Bases: object
Base class for Textdata writer and reader
Holds some basic accessors, constants, and functions; includes some invariant assertions
the name of the type of data in the stream or None, a read-only attribute
the version of the type of data in the stream or None, a read-only attribute
Generator: for each line, yields a tuple of the decoded tokens
Generator yields list of raw tokens on each line, skips blank lines
Bases: onyx.textdata.textdata.TextdataBase
Reads the Textdata for an object from a stream, returning the unencoded tokens
Gives access to the header information
the name of the type of data in the stream or None, a read-only attribute
the version of the type of data in the stream or None, a read-only attribute
Generator: for each line, yields a tuple of the decoded tokens
Generator yields list of raw tokens on each line, skips blank lines
Bases: onyx.textdata.textdata.TextdataBase
Writes the encoded Textdata tokens for an object to a stream
Does the checking necessary to ensure that the contents written to the stream are a valid instance of a Textdata object
Writes markers to note the end of this textdata object in the stream; futher attempts to write will raise an error; close() can be called multiple times
the name of the type of data in the stream or None, a read-only attribute
the version of the type of data in the stream or None, a read-only attribute
Generator: for each line, yields a tuple of the decoded tokens
Generator yields list of raw tokens on each line, skips blank lines
Write the comment string, followed by a newline
Writes a newline
Ensures that the header has been written; encodes the string token to the output stream with spacing
Does write_token(token) followed by write_newline()
If necessary, ensures that the header has been written; encodes each string token from iterable and appends each encoded token to the output stream with spacing
Does write_tokens(iterable) followed by write_newline()