Back to index

python3.2  3.2.2
Classes | Functions
encodings.quopri_codec Namespace Reference

Classes

class  Codec
class  IncrementalEncoder
class  IncrementalDecoder
class  StreamWriter
class  StreamReader

Functions

def quopri_encode
def quopri_decode
def getregentry

Detailed Description

Codec for quoted-printable encoding.

This codec de/encodes from bytes to bytes and is therefore usable with
bytes.transform() and bytes.untransform().

Function Documentation

Definition at line 47 of file quopri_codec.py.

00047 
00048 def getregentry():
00049     return codecs.CodecInfo(
00050         name='quopri',
00051         encode=quopri_encode,
00052         decode=quopri_decode,
00053         incrementalencoder=IncrementalEncoder,
00054         incrementaldecoder=IncrementalDecoder,
00055         streamwriter=StreamWriter,
00056         streamreader=StreamReader,
00057     )
def encodings.quopri_codec.quopri_decode (   input,
  errors = 'strict' 
)

Definition at line 18 of file quopri_codec.py.

00018 
00019 def quopri_decode(input, errors='strict'):
00020     assert errors == 'strict'
00021     f = BytesIO(input)
00022     g = BytesIO()
00023     quopri.decode(f, g)
00024     return (g.getvalue(), len(input))

Here is the call graph for this function:

Here is the caller graph for this function:

def encodings.quopri_codec.quopri_encode (   input,
  errors = 'strict' 
)

Definition at line 11 of file quopri_codec.py.

00011 
00012 def quopri_encode(input, errors='strict'):
00013     assert errors == 'strict'
00014     f = BytesIO(input)
00015     g = BytesIO()
00016     quopri.encode(f, g, 1)
00017     return (g.getvalue(), len(input))

Here is the call graph for this function:

Here is the caller graph for this function: