Function
docutils.core.publish_parts

Signature

publish_parts(source, source_path=None, source_class=<class docutils.io.StringInput at 0x413d2e0c>, destination_path=None, reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', writer=None, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides=None, config_section=None, enable_exit_status=None)

Documentation String

Set up & run a Publisher, and return a dictionary of document parts. Dictionary keys are the names of parts, and values are Unicode strings; encoding is up to the client. For programmatic use with string I/O.

For encoded string input, be sure to set the 'input_encoding' setting to the desired encoding. Set it to 'unicode' for unencoded Unicode string input. Here's how:

publish_parts(..., settings_overrides={'input_encoding': 'unicode'})

Parameters: see publish_programmatically.