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). NtstrictcCs3|djpt‚ti|ƒ}|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. RN(terrorstAssertionErrortbase64t encodestringtinputtoutputtlen(RRR((t3/data/zmath/lib/python2.4/encodings/base64_codec.pyt base64_encode s cCs3|djpt‚ti|ƒ}|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. RN(RRRt decodestringRRR(RRR((Rt base64_decodes tCodeccBs tZdd„Zdd„ZRS(NRcCs t||ƒS(N(R RR(tselfRR((Rtencode/scCs t||ƒS(N(R RR(R RR((Rtdecode1s(t__name__t __module__RR(((RR -s t StreamWritercBstZRS(N(RR(((RR4st StreamReadercBstZRS(N(RR(((RR7scCsttttfS(N(R R RR(((Rt getregentry<s( t__doc__tcodecsRR R R RRR(RRR R RRR R((Rt?s