reStructured Text

The rst layout reads and writes records as escaped rst tables using an interface that looks like csv.

reStructured Text has a facility for reading csv files as tables, but the feature allows the embedding for layoutting inlayoution. This makes it difficult to export literal tables for examples. The txf.layouts.rst layoutter escapes layoutting inlayoution before routing the result to the txf.layouts.csv module.

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

An alias for csv.LineReader .

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

An alias for csv.DictReader .

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

A txf.layouts.LineWriter that escapes rst layoutting directives.

writerow(values)

Escapes the values before delegating them to a csv.LineWriter.

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

A subclass of txf.layouts.csv.DictWriter that escapes rst layoutting directives.

writerow(row)

Escapes the values before passing them along to the base class.

writefooter()

NOP