class documentation

class ErrorOutput(object): (source)

View In Hierarchy

Wrapper class for file-like error streams with failsave de- and encoding of str, bytes, unicode and Exception instances.
Method __init__ No summary
Method close Close the error-output stream.
Method write Write data to self.stream. Ignore, if self.stream is False.
Instance Variable decoding​_errors Decoding error handler.
Instance Variable encoding The output character encoding.
Instance Variable encoding​_errors Encoding error handler.
Instance Variable stream Where warning output is sent.
def __init__(self, stream=None, encoding=None, encoding_errors='backslashreplace', decoding_errors='replace'): (source)
Unknown Field: newfield
parameters

Parameters

Unknown Field: parameters
  • stream: 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: stream text encoding. Guessed if None.
  • encoding_errors: how to treat encoding errors.
def close(self): (source)

Close the error-output stream.

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

def write(self, data): (source)

Write data to self.stream. Ignore, if self.stream is False.

data can be a string, unicode, or Exception instance.

decoding_errors = (source)
Decoding error handler.
encoding = (source)
The output character encoding.
encoding_errors = (source)
Encoding error handler.
stream = (source)
Where warning output is sent.