lJc@sdZdZddkTddklZddklZlZlZddkZddk Z ddk Z ddk Z ddd d d d d ddg Z dZ dddddgZdZeiZdefdYZdefdYZd efdYZdefdYZyddklZWnej o eZnXyeWnej o eZnXdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d%Z&d&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-d-Z.d.Z/d/Z0d0Z1d1Z2d2Z3d3Z4d4Z5d5Z6d6Z7d7Z8d8Z9d9Z:d:Z;d;Z<d<Z=d=Z>d>Z?d?Z@d@ZAdAZBdBZCdCZDdDZEdEZFdFZGdGZHdHZIdIZJdJZKdKZLdLZMdMZNdNZOdOZPdPZQdQZRdRZSeCeMeNeOgZTe iUgZVeWD]$ZXe iYdSeXo eVeXnq[V[Xd fdTYZZdUZ[hZ\dVZ]d fdWYZ^dXfdYYZ_ddk`ZadZZbd[Zcydd\kdleZeWn#ej odd\keleZenXed]Zfed^Zgd_Zhd`ZdaZiejdbjo eindS(csCreate portable serialized representations of Python objects. See module cPickle for a (much) faster implementation. See module copy_reg for a mechanism for registering custom picklers. See module pickletools source for extensive comments. Classes: Pickler Unpickler Functions: dump(object, file) dumps(object) -> string load(file) -> object loads(string) -> object Misc variables: __version__ format_version compatible_formats s$Revision: 38432 $i(t*(tdispatch_table(t_extension_registryt_inverted_registryt_extension_cacheNt PickleErrort PicklingErrortUnpicklingErrortPicklert Unpicklertdumptdumpstloadtloadss2.0s1.0s1.1s1.2s1.3icBseZdZRS(s6A common base class for the other pickling exceptions.(t__name__t __module__t__doc__(((s/sys/lib/python/pickle.pyR:scBseZdZRS(s]This exception is raised when an unpicklable object is passed to the dump() method. (RRR(((s/sys/lib/python/pickle.pyR>scBseZdZRS(sThis exception is raised when there is a problem unpickling an object, such as a security violation. Note that other exceptions may also be raised during unpickling, including (but not necessarily limited to) AttributeError, EOFError, ImportError, and IndexError. (RRR(((s/sys/lib/python/pickle.pyREst_StopcBseZdZRS(cCs ||_dS(N(tvalue(tselfR((s/sys/lib/python/pickle.pyt__init__Ss(RRR(((s/sys/lib/python/pickle.pyRRs(t PyStringMapt(t.t0t1t2tFtItJtKtLtMtNtPtQtRtStTtUtVtXtatbtctdt}tetgthtitjtlt]totptqtrtsttt)tutGsI01 sI00 sssssssssssss[A-Z][A-Z0-9_]+$cBseZddZdZdZdZeidZ eidZ dZ dZ dZ ddddd ZhZd Zeeet|d|Sntt|dS(Nist|d|Sntt|dS(Nisds (RFRBtBINFLOATtFLOATRZ(RRPR[((s/sys/lib/python/pickle.pyt save_floats cCs|ioZt|}|djo|itt||q|it|d||n|itt|d|i|dS(Nis          # N(0RRR?RRKR RVtstructR[RTR_RNRbRcRmReRtNoneTypeRtboolRtIntTypeRtLongTypeRt FloatTypeRRkRt UnicodeTypeRRlRRtListTypeRRRtDictionaryTypeRRRt InstanceTypeRit ClassTypet FunctionTypetBuiltinFunctionTypeRg(((s/sys/lib/python/pickle.pyRs` $    @  N           3      # & (   cCsHy|t|i|Wn&tj o|g|t|dii(RR(Rtunpack((s/sys/lib/python/pickle.pyt load_binfloatscCs|id }xcdD]R}|i|o<|i|p tdn|t|t| !}PqqWtd|i|iddS(Nis"'sinsecure string pickles string-escape(Rt startswithtendswithRARSRtdecode(RtrepR8((s/sys/lib/python/pickle.pyt load_strings   cCs3td|id}|i|i|dS(NR2i(R RR(RRS((s/sys/lib/python/pickle.pytload_binstringscCs$|it|id ddS(Nisraw-unicode-escape(RRR(R((s/sys/lib/python/pickle.pyt load_unicodescCs<td|id}|it|i|ddS(NR2isutf-8(R RRR(RRS((s/sys/lib/python/pickle.pytload_binunicodescCs/t|id}|i|i|dS(Ni(RRR(RRS((s/sys/lib/python/pickle.pytload_short_binstringscCs1|i}t|i|dg|i|)dS(Ni(RttupleR(RR((s/sys/lib/python/pickle.pyt load_tuples cCs|iiddS(N((RR(R((s/sys/lib/python/pickle.pytload_empty_tuplescCs|idf|idRR?RR@RRAtDUPRBR^RCR\RDR]RERYRFRWRGRXRIRRKRRMRRNRRURRVRRWRO(((s/sys/lib/python/pickle.pyR ;s                                                                                                            R.cBseZRS((RR(((s/sys/lib/python/pickle.pyR.scCs9|djodSn|djot|}|idptd|id}t||}|d@od|d}qt|ddd jod |d}qnt| }|idptd|id}t||}|d@o|d7}n|d }|d |>7}|djptt|}d|id}t||}||jodd |||d}nt|ddd jod|d}n|ido|dd!}n |d}t|d@djpt||fti|}|dddS(sEncode a long to a two's complement little-endian binary string. Note that 0L is a special case, returning an empty string, to save a byte in the LONG1 pickling context. >>> encode_long(0L) '' >>> encode_long(255L) '\xff\x00' >>> encode_long(32767L) '\xff\x7f' >>> encode_long(-256L) '\x00\xff' >>> encode_long(-32768L) '\x00\x80' >>> encode_long(-128L) '\x80' >>> encode_long(127L) '\x7f' >>> iRwt0xiRit0x0iit0x00ilRt0xffiN(thexRRRRRSRDt _binasciit unhexlify(Rotashext njunkcharstnibblestnbitst newnibblestbinary((s/sys/lib/python/pickle.pyRsB          'cCswt|}|djodSnti|ddd}t|d}|ddjo|d|d>8}n|S( s\Decode a long from a two's complement little-endian binary string. >>> decode_long('') 0L >>> decode_long("\xff\x00") 255L >>> decode_long("\xff\x7f") 32767L >>> decode_long("\x00\xff") -256L >>> decode_long("\x00\x80") -32768L >>> decode_long("\x80") -128L >>> decode_long("\x7f") 127L ilNiisli(RSRathexlifyR (R tnbytesRcR((s/sys/lib/python/pickle.pyR.s  (tStringIOcCst||i|dS(N(RR (RPRHRI((s/sys/lib/python/pickle.pyR QscCs)t}t||i||iS(N(RkRR tgetvalue(RPRIRH((s/sys/lib/python/pickle.pyR Ts cCst|iS(N(R R (RH((s/sys/lib/python/pickle.pyR YscCst|}t|iS(N(RkR R (RvRH((s/sys/lib/python/pickle.pyR \s cCsddk}|iS(Ni(tdoctestttestmod(Rm((s/sys/lib/python/pickle.pyt_testbs R(kRt __version__ttypestcopy_regRRRRtmarshalRRtret__all__tformat_versiontcompatible_formatsR@R R t ExceptionRRRRtorg.python.coreRRR?Rt NameErrorRRORRR[RRRRRRRRuRtRRRRRRRRRRRRR^R\RR]RRRRYRWRXRRRRRRRRLR~RRRRXRYRZRRRRRRJt_[1]tdirRotmatchRRRRR R.tbinasciiRaRRt cStringIORkR R R RoR(((s/sys/lib/python/pickle.pyss           B`    B