I=c@sddlTddlZddlmZmZdZdejfdYZiZiZ iZ dejfdYZ d fd YZ eZ e jZe jZe ZejZejZ[ [d d Zd fdYZdfdYZdZedkrendS(i(t*N(tsaxlibtsaxextscCsDt|}t|}||k r7t|j|jSt||S(N(ttypetcmpt__name__(tatbttattb((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytversion_independent_cmps    t MarshallercBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$RS(#sttmarshaltinttfloattlongtstringttupletlistt dictionarytcomplext referencetcodetnonetobjectcCsMidd6}|j|jg|j||}|jtj|ddS(s Write the value on the open fileitidR N(tPROLOGUEtDTDtm_roottwriteRtjoin(tselftvaluetfiletdicttL((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytdump.s #cCs@idd6}|j|jg|j||}tj|dS(s-Marshal value, returning the resulting stringiRR (RRRRR(R R!R#R$((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytdumps7s #cCst|}tt|}|j|r=|j||St|tkrXd}ndt|j}t||||SdS(Ntm_longtm_(RtstrRthas_keyt m_referencetLongTypeRtgetattr(R R!R#tttitmeth((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyt_marshalRs  cCstdt|ddS(NsMarshalling of object s+ unimplemented or not supported in this DTD(t ValueErrortrepr(R R!R#((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytm_unimplemented_scCs5|j}d|g|j||d|g}|S(Ns<%s>s(ttag_rootR1(R R!R#tnameR$((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyRfs (cCs/|tt|}d|jd|fgS(Nt(R)Rt tag_reference(R R!R#R/((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyR+nscCs|j}d|dg}t|}d|ksJd|ksJd|krtj|dd}tj|dd}tj|dd}n|j||jd|d|S(NR7t>t&s&s<s>sss(ttag_none(R R!R#((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytm_NonescCs|j||S(N(RS(R R!R#((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyt m_NoneTypescCsB|j}d|dt|jdt|jd|dgS(NR7R9t ss(ttag_codeR tbase64R=R&t encodestring(R R!R#R6R$R R[R>((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytm_codes    c Cs|j}g}|dd|dt__getinitargs__s((t tag_instanceR)Rt __class__R=t __module__RthasattrR^tlenR1t __getstate__tAttributeErrort__dict__( R R!R#R6R$R/tclstargstgetstatetstuff((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyt m_instances,          (%RRaRRR5RARCRER;RFRIRKRVR8RZRRR_R%R&R1R4RR+R?R@RBRDR'RHRJRPRQRSRTRYR]Rk(((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyR sF               t UnmarshallercBs~eZi dAd6dBd6dCd6dDd 6dEd 6dFd6dGd6dHd6dId6dJd6dKd6dLd!6dMd$6Zd%Zd&Zd'Zd(Zd)Zd*Z d+Z d,Z d-Z d.Z d/Zd0ZeZZZeZZZeZd1Zd2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd:Z d;Z!d<Z"d=Z#d>Z$d?Z%RS(Nt um_start_rootR t um_start_intt um_end_intRtum_start_floatt um_end_floatRt um_start_longt um_end_longRtum_start_stringt um_end_stringRtum_start_tuplet um_end_tupleRt um_start_listt um_end_listRtum_start_dictionarytum_end_dictionaryRtum_start_complextum_end_complexRtum_start_referenceRt um_start_codet um_end_codeRt um_start_nonet um_end_noneRtum_start_instancetum_end_instanceRcCsi}xo|jjD]^\}\}}|dk rFt||}n|dk rdt||}n||f||((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyRs  cCsS|jjtg}|jdr?|d}||j|toutputR"toutput2((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyttest-s        t_AcBseZdZRS(cCsdS(Ns ((R ((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyt__repr__@s(RRaR(((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyR?st_BcBseZdZRS(cCsdS(Ns ((R ((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyRCs(RRaR(((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyRBsc CsLdGHddtddddddd d d gid d 6dd6g }ttttt|t}t|_ ddtdddddg|j _ ||_ |g}ttttt|ddddtddidd6dd6ddg}|j |ttttt|gddtd}|ddgfksHt dS(NsTesting XML marshalling...iil{gQ3@y@shere is a string & a italphatbetatgammaR!RNRilAtspamteggss s 1.0 abc g?tabcy?@(iiiy?@y?@(RtpowRRRR%R&RRt subobjectRR R=R(R$tinstancetrecursive_listR((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pytruntestsFs*    #   t__main__(ttypesRtxml.saxRRR t HandlerBaseR RRRRlRt_mR%R&t_umRRRRRRR(((sE/opt/freeware/lib/python2.7/site-packages/_xmlplus/marshal/generic.pyts.           %