Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
docutils.io.ErrorOutput Class Reference

Public Member Functions

 __init__ (self, destination=None, encoding=None, encoding_errors='backslashreplace', decoding_errors='replace')
 
 write (self, data)
 
 close (self)
 
 isatty (self)
 

Public Attributes

 destination
 
 encoding
 
 encoding_errors
 
 decoding_errors
 

Detailed Description

Wrapper class for file-like error streams with
failsafe de- and encoding of `str`, `bytes`, `unicode` and
`Exception` instances.

Constructor & Destructor Documentation

◆ __init__()

docutils.io.ErrorOutput.__init__ (   self,
  destination = None,
  encoding = None,
  encoding_errors = 'backslashreplace',
  decoding_errors = 'replace' 
)
:Parameters:
    - `destination`: a file-like object,
                a string (path to a file),
                `None` (write to `sys.stderr`, default), or
                evaluating to `False` (write() requests are ignored).
    - `encoding`: `destination` text encoding. Guessed if None.
    - `encoding_errors`: how to treat encoding errors.

Member Function Documentation

◆ close()

docutils.io.ErrorOutput.close (   self)
Close the error-output stream.

Ignored if the destination is` sys.stderr` or `sys.stdout` or has no
close() method.

◆ isatty()

docutils.io.ErrorOutput.isatty (   self)
Return True, if the destination is connected to a TTY device.

◆ write()

docutils.io.ErrorOutput.write (   self,
  data 
)
Write `data` to self.destination. Ignore, if self.destination is False.

`data` can be a `bytes`, `str`, or `Exception` instance.

The documentation for this class was generated from the following file: