docutils.parsers.rst.directives.tables module
Directives for table elements.
- class Table(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
DirectiveGeneric table base class.
- optional_arguments = 1
Number of optional arguments after the required arguments.
- final_argument_whitespace = True
May the final argument contain whitespace?
- option_spec = {'align': <function align>, 'class': <function class_option>, 'name': <function unchanged>, 'width': <function length_or_percentage_or_unitless>, 'widths': <function value_or.<locals>.auto_or_other>}
Mapping of option names to validator functions.
- has_content = True
May the directive have content?
- property widths
- class RSTTable(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
TableClass for the “table” directive for formal tables using rST syntax.
- class CSVTable(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
Table- option_spec = {'align': <function align>, 'class': <function class_option>, 'delim': <function single_char_or_whitespace_or_unicode>, 'encoding': <function encoding>, 'escape': <function single_char_or_unicode>, 'file': <function path>, 'header': <function unchanged>, 'header-rows': <function nonnegative_int>, 'keepspace': <function flag>, 'name': <function unchanged>, 'quote': <function single_char_or_unicode>, 'stub-columns': <function nonnegative_int>, 'url': <function uri>, 'width': <function length_or_percentage_or_unitless>, 'widths': <function value_or.<locals>.auto_or_other>}
Mapping of option names to validator functions.
- class DocutilsDialect(options)[source]
Bases:
DialectCSV dialect for csv_table directive.
- strict = True
- lineterminator = '\n'
- quoting = 0
- delimiter = ','
- skipinitialspace = True
- quotechar = '"'
- doublequote = True
- class HeaderDialect[source]
Bases:
DialectCSV dialect used for the “header” option data.
Deprecated. Will be removed in Docutils 0.22.
- delimiter = ','
- quotechar = '"'
- escapechar = '\\'
- doublequote = False
- skipinitialspace = True
- strict = True
- lineterminator = '\n'
- quoting = 0
- class ListTable(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
Bases:
TableImplement tables whose data is encoded as a uniform two-level bullet list. For further ideas, see https://docutils.sourceforge.io/docs/dev/rst/alternatives.html#list-driven-tables
- option_spec = {'align': <function align>, 'class': <function class_option>, 'header-rows': <function nonnegative_int>, 'name': <function unchanged>, 'stub-columns': <function nonnegative_int>, 'width': <function length_or_percentage_or_unitless>, 'widths': <function value_or.<locals>.auto_or_other>}
Mapping of option names to validator functions.