Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
codecs.IncrementalEncoder Class Reference

Inherits _object.

Inherited by codecs.BufferedIncrementalEncoder, encodings.ascii.IncrementalEncoder, encodings.base64_codec.IncrementalEncoder, encodings.big5.IncrementalEncoder, encodings.big5hkscs.IncrementalEncoder, encodings.bz2_codec.IncrementalEncoder, encodings.charmap.IncrementalEncoder, encodings.cp037.IncrementalEncoder, encodings.cp1006.IncrementalEncoder, encodings.cp1026.IncrementalEncoder, encodings.cp1140.IncrementalEncoder, encodings.cp1250.IncrementalEncoder, encodings.cp1251.IncrementalEncoder, encodings.cp1252.IncrementalEncoder, encodings.cp1253.IncrementalEncoder, encodings.cp1254.IncrementalEncoder, encodings.cp1255.IncrementalEncoder, encodings.cp1256.IncrementalEncoder, encodings.cp1257.IncrementalEncoder, encodings.cp1258.IncrementalEncoder, encodings.cp424.IncrementalEncoder, encodings.cp437.IncrementalEncoder, encodings.cp500.IncrementalEncoder, encodings.cp720.IncrementalEncoder, encodings.cp737.IncrementalEncoder, encodings.cp775.IncrementalEncoder, encodings.cp850.IncrementalEncoder, encodings.cp852.IncrementalEncoder, encodings.cp855.IncrementalEncoder, encodings.cp856.IncrementalEncoder, encodings.cp857.IncrementalEncoder, encodings.cp858.IncrementalEncoder, encodings.cp860.IncrementalEncoder, encodings.cp861.IncrementalEncoder, encodings.cp862.IncrementalEncoder, encodings.cp863.IncrementalEncoder, encodings.cp864.IncrementalEncoder, encodings.cp865.IncrementalEncoder, encodings.cp866.IncrementalEncoder, encodings.cp869.IncrementalEncoder, encodings.cp874.IncrementalEncoder, encodings.cp875.IncrementalEncoder, encodings.cp932.IncrementalEncoder, encodings.cp949.IncrementalEncoder, encodings.cp950.IncrementalEncoder, encodings.euc_jis_2004.IncrementalEncoder, encodings.euc_jisx0213.IncrementalEncoder, encodings.euc_jp.IncrementalEncoder, encodings.euc_kr.IncrementalEncoder, encodings.gb18030.IncrementalEncoder, encodings.gb2312.IncrementalEncoder, encodings.gbk.IncrementalEncoder, encodings.hex_codec.IncrementalEncoder, encodings.hp_roman8.IncrementalEncoder, encodings.hz.IncrementalEncoder, encodings.iso2022_jp.IncrementalEncoder, encodings.iso2022_jp_1.IncrementalEncoder, encodings.iso2022_jp_2004.IncrementalEncoder, encodings.iso2022_jp_2.IncrementalEncoder, encodings.iso2022_jp_3.IncrementalEncoder, encodings.iso2022_jp_ext.IncrementalEncoder, encodings.iso2022_kr.IncrementalEncoder, encodings.iso8859_10.IncrementalEncoder, encodings.iso8859_11.IncrementalEncoder, encodings.iso8859_13.IncrementalEncoder, encodings.iso8859_14.IncrementalEncoder, encodings.iso8859_15.IncrementalEncoder, encodings.iso8859_16.IncrementalEncoder, encodings.iso8859_1.IncrementalEncoder, encodings.iso8859_2.IncrementalEncoder, encodings.iso8859_3.IncrementalEncoder, encodings.iso8859_4.IncrementalEncoder, encodings.iso8859_5.IncrementalEncoder, encodings.iso8859_6.IncrementalEncoder, encodings.iso8859_7.IncrementalEncoder, encodings.iso8859_8.IncrementalEncoder, encodings.iso8859_9.IncrementalEncoder, encodings.johab.IncrementalEncoder, encodings.koi8_r.IncrementalEncoder, encodings.koi8_u.IncrementalEncoder, encodings.latin_1.IncrementalEncoder, encodings.mac_arabic.IncrementalEncoder, encodings.mac_centeuro.IncrementalEncoder, encodings.mac_croatian.IncrementalEncoder, encodings.mac_cyrillic.IncrementalEncoder, encodings.mac_farsi.IncrementalEncoder, encodings.mac_greek.IncrementalEncoder, encodings.mac_iceland.IncrementalEncoder, encodings.mac_latin2.IncrementalEncoder, encodings.mac_roman.IncrementalEncoder, encodings.mac_romanian.IncrementalEncoder, encodings.mac_turkish.IncrementalEncoder, encodings.mbcs.IncrementalEncoder, encodings.palmos.IncrementalEncoder, encodings.ptcp154.IncrementalEncoder, encodings.punycode.IncrementalEncoder, encodings.quopri_codec.IncrementalEncoder, encodings.raw_unicode_escape.IncrementalEncoder, encodings.rot_13.IncrementalEncoder, encodings.shift_jis.IncrementalEncoder, encodings.shift_jis_2004.IncrementalEncoder, encodings.shift_jisx0213.IncrementalEncoder, encodings.tis_620.IncrementalEncoder, encodings.undefined.IncrementalEncoder, encodings.unicode_escape.IncrementalEncoder, encodings.unicode_internal.IncrementalEncoder, encodings.utf_16.IncrementalEncoder, encodings.utf_16_be.IncrementalEncoder, encodings.utf_16_le.IncrementalEncoder, encodings.utf_32.IncrementalEncoder, encodings.utf_32_be.IncrementalEncoder, encodings.utf_32_le.IncrementalEncoder, encodings.utf_7.IncrementalEncoder, encodings.utf_8.IncrementalEncoder, encodings.utf_8_sig.IncrementalEncoder, encodings.uu_codec.IncrementalEncoder, and encodings.zlib_codec.IncrementalEncoder.

Collaboration diagram for codecs.IncrementalEncoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def encode
def reset
def getstate
def setstate

Public Attributes

 errors
 buffer
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

An IncrementalEncoder encodes an input in multiple steps. The input can
be passed piece by piece to the encode() method. The IncrementalEncoder
remembers the state of the encoding process between calls to encode().

Definition at line 158 of file codecs.py.


Constructor & Destructor Documentation

def codecs.IncrementalEncoder.__init__ (   self,
  errors = 'strict' 
)
Creates an IncrementalEncoder instance.

The IncrementalEncoder may use different error handling schemes by
providing the errors keyword argument. See the module docstring
for a list of possible values.

Reimplemented in codecs.BufferedIncrementalEncoder, encodings.bz2_codec.IncrementalEncoder, encodings.zlib_codec.IncrementalEncoder, encodings.utf_8_sig.IncrementalEncoder, encodings.utf_16.IncrementalEncoder, and encodings.utf_32.IncrementalEncoder.

Definition at line 164 of file codecs.py.

00164 
00165     def __init__(self, errors='strict'):
00166         """
00167         Creates an IncrementalEncoder instance.
00168 
00169         The IncrementalEncoder may use different error handling schemes by
00170         providing the errors keyword argument. See the module docstring
00171         for a list of possible values.
00172         """
00173         self.errors = errors
00174         self.buffer = ""

Here is the caller graph for this function:


Member Function Documentation

def codecs.IncrementalEncoder.encode (   self,
  input,
  final = False 
)
Encodes input and returns the resulting object.

Reimplemented in codecs.BufferedIncrementalEncoder, encodings.punycode.IncrementalEncoder, encodings.uu_codec.IncrementalEncoder, encodings.bz2_codec.IncrementalEncoder, encodings.zlib_codec.IncrementalEncoder, encodings.quopri_codec.IncrementalEncoder, encodings.utf_8_sig.IncrementalEncoder, encodings.base64_codec.IncrementalEncoder, encodings.charmap.IncrementalEncoder, encodings.hex_codec.IncrementalEncoder, encodings.undefined.IncrementalEncoder, encodings.mbcs.IncrementalEncoder, encodings.hp_roman8.IncrementalEncoder, encodings.mac_latin2.IncrementalEncoder, encodings.ptcp154.IncrementalEncoder, encodings.utf_16.IncrementalEncoder, encodings.rot_13.IncrementalEncoder, encodings.ascii.IncrementalEncoder, encodings.latin_1.IncrementalEncoder, encodings.raw_unicode_escape.IncrementalEncoder, encodings.unicode_escape.IncrementalEncoder, encodings.unicode_internal.IncrementalEncoder, encodings.cp720.IncrementalEncoder, encodings.palmos.IncrementalEncoder, encodings.utf_16_be.IncrementalEncoder, encodings.utf_16_le.IncrementalEncoder, encodings.utf_8.IncrementalEncoder, encodings.cp037.IncrementalEncoder, encodings.cp1006.IncrementalEncoder, encodings.cp1026.IncrementalEncoder, encodings.cp1140.IncrementalEncoder, encodings.cp1250.IncrementalEncoder, encodings.cp1251.IncrementalEncoder, encodings.cp1252.IncrementalEncoder, encodings.cp1253.IncrementalEncoder, encodings.cp1254.IncrementalEncoder, encodings.cp1255.IncrementalEncoder, encodings.cp1256.IncrementalEncoder, encodings.cp1257.IncrementalEncoder, encodings.cp1258.IncrementalEncoder, encodings.cp424.IncrementalEncoder, encodings.cp437.IncrementalEncoder, encodings.cp500.IncrementalEncoder, encodings.cp737.IncrementalEncoder, encodings.cp775.IncrementalEncoder, encodings.cp850.IncrementalEncoder, encodings.cp852.IncrementalEncoder, encodings.cp855.IncrementalEncoder, encodings.cp856.IncrementalEncoder, encodings.cp857.IncrementalEncoder, encodings.cp858.IncrementalEncoder, encodings.cp860.IncrementalEncoder, encodings.cp861.IncrementalEncoder, encodings.cp862.IncrementalEncoder, encodings.cp863.IncrementalEncoder, encodings.cp864.IncrementalEncoder, encodings.cp865.IncrementalEncoder, encodings.cp866.IncrementalEncoder, encodings.cp869.IncrementalEncoder, encodings.cp874.IncrementalEncoder, encodings.cp875.IncrementalEncoder, encodings.iso8859_1.IncrementalEncoder, encodings.iso8859_10.IncrementalEncoder, encodings.iso8859_11.IncrementalEncoder, encodings.iso8859_13.IncrementalEncoder, encodings.iso8859_14.IncrementalEncoder, encodings.iso8859_15.IncrementalEncoder, encodings.iso8859_16.IncrementalEncoder, encodings.iso8859_2.IncrementalEncoder, encodings.iso8859_3.IncrementalEncoder, encodings.iso8859_4.IncrementalEncoder, encodings.iso8859_5.IncrementalEncoder, encodings.iso8859_6.IncrementalEncoder, encodings.iso8859_7.IncrementalEncoder, encodings.iso8859_8.IncrementalEncoder, encodings.iso8859_9.IncrementalEncoder, encodings.koi8_r.IncrementalEncoder, encodings.koi8_u.IncrementalEncoder, encodings.mac_arabic.IncrementalEncoder, encodings.mac_centeuro.IncrementalEncoder, encodings.mac_croatian.IncrementalEncoder, encodings.mac_cyrillic.IncrementalEncoder, encodings.mac_farsi.IncrementalEncoder, encodings.mac_greek.IncrementalEncoder, encodings.mac_iceland.IncrementalEncoder, encodings.mac_roman.IncrementalEncoder, encodings.mac_romanian.IncrementalEncoder, encodings.mac_turkish.IncrementalEncoder, encodings.tis_620.IncrementalEncoder, encodings.utf_32.IncrementalEncoder, encodings.utf_7.IncrementalEncoder, encodings.utf_32_be.IncrementalEncoder, and encodings.utf_32_le.IncrementalEncoder.

Definition at line 175 of file codecs.py.

00175 
00176     def encode(self, input, final=False):
00177         """
00178         Encodes input and returns the resulting object.
00179         """
00180         raise NotImplementedError

Here is the caller graph for this function:

Return the current state of the encoder.

Reimplemented in codecs.BufferedIncrementalEncoder, encodings.utf_8_sig.IncrementalEncoder, encodings.utf_16.IncrementalEncoder, and encodings.utf_32.IncrementalEncoder.

Definition at line 186 of file codecs.py.

00186 
00187     def getstate(self):
00188         """
00189         Return the current state of the encoder.
00190         """
00191         return 0

Resets the encoder to the initial state.

Reimplemented in codecs.BufferedIncrementalEncoder, encodings.bz2_codec.IncrementalEncoder, encodings.zlib_codec.IncrementalEncoder, encodings.utf_8_sig.IncrementalEncoder, encodings.utf_16.IncrementalEncoder, and encodings.utf_32.IncrementalEncoder.

Definition at line 181 of file codecs.py.

00181 
00182     def reset(self):
00183         """
00184         Resets the encoder to the initial state.
00185         """

Here is the caller graph for this function:

def codecs.IncrementalEncoder.setstate (   self,
  state 
)
Set the current state of the encoder. state must have been
returned by getstate().

Reimplemented in codecs.BufferedIncrementalEncoder, encodings.utf_8_sig.IncrementalEncoder, encodings.utf_16.IncrementalEncoder, and encodings.utf_32.IncrementalEncoder.

Definition at line 192 of file codecs.py.

00192 
00193     def setstate(self, state):
00194         """
00195         Set the current state of the encoder. state must have been
00196         returned by getstate().
00197         """


Member Data Documentation

Reimplemented in codecs.BufferedIncrementalEncoder.

Definition at line 173 of file codecs.py.

Creates an IncrementalEncoder instance.

The IncrementalEncoder may use different error handling schemes by
providing the errors keyword argument. See the module docstring
for a list of possible values.

Reimplemented in encodings.bz2_codec.IncrementalEncoder, encodings.zlib_codec.IncrementalEncoder, encodings.base64_codec.IncrementalEncoder, and encodings.hex_codec.IncrementalEncoder.

Definition at line 172 of file codecs.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


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