mò &U²Ic@sŽdZdkZdkZdd„Zdd„Zdeifd„ƒYZdeeifd„ƒYZd eeifd „ƒYZd „ZdS( sÿ Python 'base64_codec' Codec - base64 content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). NtstrictcCsti|ƒ}|t|ƒfS(s Encodes the object input and returns a tuple (output object, length consumed). errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. N(tbase64t encodestringtinputtoutputtlen(RterrorsR((t3/data/zmath/lib/python2.4/encodings/base64_codec.pyt base64_encode s cCsti|ƒ}|t|ƒfS(sË Decodes the object input and returns a tuple (output object, length consumed). input must be an object which provides the bf_getreadbuf buffer slot. Python strings, buffer objects and memory mapped files are examples of objects providing this slot. errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. N(Rt decodestringRRR(RRR((Rt base64_decodes tCodeccBs tZdd„Zdd„ZRS(NRcCs t||ƒS(N(RRR(tselfRR((Rtencode/scCs t||ƒS(N(R RR(R RR((Rtdecode1s(t__name__t __module__R R(((RR -s t StreamWritercBstZRS(N(RR(((RR4st StreamReadercBstZRS(N(RR(((RR7scCsttttfS(N(RR RR(((Rt getregentry<s( t__doc__tcodecsRRR R RRR(RRR R RRRR((Rt?s