![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self, source=None, source_path=None, encoding=None, error_handler='strict') | |
| __repr__ (self) | |
| read (self) | |
| decode (self, data) | |
| determine_encoding_from_data (self, data) | |
| isatty (self) | |
Public Member Functions inherited from docutils.TransformSpec | |
| get_transforms (self) | |
Public Attributes | |
| encoding | |
| error_handler | |
| source | |
| source_path | |
| successful_encoding | |
Public Attributes inherited from docutils.TransformSpec | |
| default_transforms | |
Static Public Attributes | |
| str | component_type = 'input' |
| default_source_path = None | |
| coding_slug = re.compile(br"coding[:=]\s*([-\w.]+)") | |
| tuple | byte_order_marks |
Static Public Attributes inherited from docutils.TransformSpec | |
| tuple | default_transforms = () |
| tuple | unknown_reference_resolvers = () |
Abstract base class for input wrappers. Docutils input objects must provide a `read()` method that returns the source, typically as `str` instance. Inheriting `TransformSpec` allows input objects to add "transforms" and "unknown_reference_resolvers" to the "Transformer". (Optional for custom input objects since Docutils 0.19.)
| docutils.io.Input.__init__ | ( | self, | |
source = None, |
|||
source_path = None, |
|||
encoding = None, |
|||
error_handler = 'strict' |
|||
| ) |
Reimplemented in sphinx.io.SphinxFileInput, and docutils.io.FileInput.
| docutils.io.Input.decode | ( | self, | |
| data | |||
| ) |
Decode `data` if required.
Return Unicode `str` instances unchanged (nothing to decode).
If `self.encoding` is None, determine encoding from data
or try UTF-8 and the locale's preferred encoding.
The client application should call ``locale.setlocale()`` at the
beginning of processing::
locale.setlocale(locale.LC_ALL, '')
Raise UnicodeError if unsuccessful.
Provisional: encoding detection will be removed in Docutils 1.0.
| docutils.io.Input.determine_encoding_from_data | ( | self, | |
| data | |||
| ) |
Try to determine the encoding of `data` by looking *in* `data`. Check for a byte order mark (BOM) or an encoding declaration.
| docutils.io.Input.isatty | ( | self | ) |
Return True, if the input source is connected to a TTY device.
| docutils.io.Input.read | ( | self | ) |
Return input as `str`. Define in subclasses.
Reimplemented in docutils.io.FileInput, docutils.io.StringInput, docutils.io.NullInput, and docutils.io.DocTreeInput.
|
static |