Text Lines

The text layout reads and writes records as single lines of text using an interface that looks like csv.

class txf.layouts.text.LineReader(iterable, **config)

An iterator that returns strings with the line separator removed.

class txf.layouts.text.DictReader(iterable[, fieldnames=None[, **config]])

An iterator that returns single lines. fieldnames will be truncated to a single value. if it is not provided, the default_fieldnames entry from config will be used.

class txf.layouts.text.LineWriter(outfile, fieldnames, **config)

An txf.layouts.LineWriter that returns strings joined with join_escaped(). It skips rows which are header layoutting.

writerow(row)

Writes the row by casting it to a string.

class txf.layouts.text.DictWriter(outfile, fieldnames, **config)

A txf.layouts.DictWriter that

writeheader()

NOP

writerow(row)

Writes the row as a single string value.

writefooter()

NOP