class documentation

class FileOutput(Output): (source)

Known subclasses: docutils.io.BinaryFileOutput

View In Hierarchy

Output for single, simple file-like objects.

Method __init__ :Parameters: - `destination`: either a file-like object (which is written directly) or `None` (which implies `sys.stdout` if no `destination_path` given). - `destination_path`: a path to a file, which is opened and then written...
Method close Undocumented
Method open Undocumented
Method write Encode `data`, write it to a single file, and return it.
Instance Variable autoclose Undocumented
Instance Variable destination The destination for output data.
Instance Variable destination_path A text reference to the destination.
Instance Variable mode The mode argument for `open()`.
Instance Variable opened Undocumented
Instance Variable _stderr Undocumented

Inherited from Output:

Method __repr__ Undocumented
Method encode Undocumented
Class Variable component_type Undocumented
Class Variable default_destination_path Undocumented
Instance Variable encoding Text encoding for the output destination.
Instance Variable error_handler Text encoding error handler.

Inherited from TransformSpec (via Output):

Method get_transforms Transforms required by this class. Override in subclasses.
Class Variable default_transforms Undocumented
Class Variable unknown_reference_resolvers List of functions to try to resolve unknown references. Unknown references have a 'refname' attribute which doesn't correspond to any target in the document. Called when the transforms in `docutils.transforms...
def __init__(self, destination=None, destination_path=None, encoding=None, error_handler='strict', autoclose=True, handle_io_errors=None, mode=None): (source)

:Parameters: - `destination`: either a file-like object (which is written directly) or `None` (which implies `sys.stdout` if no `destination_path` given). - `destination_path`: a path to a file, which is opened and then written. - `encoding`: the text encoding of the output file. - `error_handler`: the encoding error handler to use. - `autoclose`: close automatically after write (except when `sys.stdout` or `sys.stderr` is the destination). - `handle_io_errors`: ignored, deprecated, will be removed. - `mode`: how the file is to be opened (see standard function `open`). The default is 'w', providing universal newline support for text files.

def close(self): (source)

Undocumented

def open(self): (source)

Undocumented

def write(self, data): (source)

Encode `data`, write it to a single file, and return it. With Python 3 or binary output mode, `data` is returned unchanged, except when specified encoding and output encoding differ.

autoclose = (source)

Undocumented

destination = (source)

The destination for output data.

destination_path = (source)

A text reference to the destination.

mode = (source)

The mode argument for `open()`.

opened: bool = (source)

Undocumented

_stderr = (source)

Undocumented