codeop.CommandCompiler

class codeop.CommandCompiler Instances of this class have __call__() methods identical in signature to compile_command(); the difference is that if the instance compiles program text containing a __future__ statement, the instance ‘remembers’ and compiles all subsequent program texts with the statement in force.

codecs.StreamWriter.writelines()

writelines(list) Writes the concatenated list of strings to the stream (possibly by reusing the write() method). The standard bytes-to-bytes codecs do not support this method.

codecs.StreamWriter.write()

write(object) Writes the object’s contents encoded to the stream.

codecs.strict_errors()

codecs.strict_errors(exception) Implements the 'strict' error handling: each encoding or decoding error raises a UnicodeError.

codecs.StreamWriter.reset()

reset() Flushes and resets the codec buffers used for keeping state. Calling this method should ensure that the data on the output is put into a clean state that allows appending of new fresh data without having to rescan the whole stream to recover state.

codecs.StreamWriter

class codecs.StreamWriter(stream, errors='strict') Constructor for a StreamWriter instance. All stream writers must provide this constructor interface. They are free to add additional keyword arguments, but only the ones defined here are used by the Python codec registry. The stream argument must be a file-like object open for writing text or binary data, as appropriate for the specific codec. The StreamWriter may implement different error handling schemes by providing the errors keyword arg

codecs.StreamReader.reset()

reset() Resets the codec buffers used for keeping state. Note that no stream repositioning should take place. This method is primarily intended to be able to recover from decoding errors.

codecs.StreamRecoder

class codecs.StreamRecoder(stream, encode, decode, Reader, Writer, errors) Creates a StreamRecoder instance which implements a two-way conversion: encode and decode work on the frontend — the data visible to code calling read() and write(), while Reader and Writer work on the backend — the data in stream. You can use these objects to do transparent transcodings from e.g. Latin-1 to UTF-8 and back. The stream argument must be a file-like object. The encode and decode arguments must adhere to

codecs.StreamReaderWriter

class codecs.StreamReaderWriter(stream, Reader, Writer, errors) Creates a StreamReaderWriter instance. stream must be a file-like object. Reader and Writer must be factory functions or classes providing the StreamReader and StreamWriter interface resp. Error handling is done in the same way as defined for the stream readers and writers.

codecs.StreamReader.readline()

readline([size[, keepends]]) Read one line from the input stream and return the decoded data. size, if given, is passed as size argument to the stream’s read() method. If keepends is false line-endings will be stripped from the lines returned.