mò Dã¸Ec @sÁdZdkZdkZdkZdkZyeWnej o eZnXe Zdfd„ƒYZ dfd„ƒYZ dfd„ƒYZ d„Z d e fd „ƒYZd e fd „ƒYZd Zdefd„ƒYZdefd„ƒYZdefd„ƒYZd„Zd„Zd„Zd„Ze eddddƒiZdfd„ƒYZeid djo d Znd!ZeeƒZed"ƒZed!ƒZd#fd$„ƒYZ d%e fd&„ƒYZ!d'e fd(„ƒYZ"d)„Z#d*e fd+„ƒYZ$d,„Z%d-„Z&d.„Z'd/„Z(d0fd1„ƒYZ)d2„Z*hd3e<d4eƒ<d5eƒ<d6eƒ<d7e<d8e#<d9e+<d:e<d;e<d<e e ƒ<d=e<d>eƒ<d?e<d@e<dAe<dBe <dCe!<dDe"<dEe$ƒ<dFe%<dGe&<dHe'<dIe(<dJe)hdKdL<dMdLdL<dNdLdLdO<ƒ<dPe)hdQd<dRdS<dTdSdS<dUdSdSdV<ƒ<dWe*((Rt asBoolean—s  cCs |iƒS(s5Convert a string to a list of strings using .split().N(R=tsplit(R=((Rt string_list¢sRiRiÿÿt InetAddresscBstZd„Zd„ZRS(NcCs ||_dS(N(t default_hostRt DEFAULT_HOST(RRE((RR¬scCsÛd}d}d|jo?|iddƒ\}}|ot|ƒ}n|iƒ}nfyt|ƒ}WnRtj oFt|iƒƒdjotdt |ƒƒ‚n|iƒ}nX|p |i }n||fS(Ntt:isnot a valid host name: ( thostRtportR=RBt port_numberR'RtlenRRRF(RR=RIRJ((RR ¯s   (R R RR (((RRDªs itwint localhostRGs 127.0.0.1t SocketAddresscBstZd„Zd„ZRS(NcCssdk}d|jp|itiƒdjo"t|ddƒ|_||_ n|i |_|i |ƒ|_ dS(Nt/itAF_UNIX( tsocketR=tfindtostseptgetattrRRtfamilytaddresstAF_INETt_parse_address(RR=RR((RRÎs  &  cCs t|ƒS(N(t inet_addressR=(RR=((RRZ×s(R R RRZ(((RROÍs tSocketBindingAddresscBstZd„ZRS(NcCs t|ƒS(N(tinet_binding_addressR=(RR=((RRZÜs(R R RZ(((RR\ÚstSocketConnectionAddresscBstZd„ZRS(NcCs t|ƒS(N(tinet_connection_addressR=(RR=((RRZás(R R RZ(((RR^ßscCsOt|tƒo5|iƒdddgjot| dƒ‚qEnt|ƒS(Ntinfs-inftnans' is not a portable float representation(R+R t basestringR'Rtfloat(R ((Rtfloat_conversionåstIpaddrOrHostnamecBstZd„Zd„ZRS(NcCsd}ti||ƒdS(Ns®(^(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])$)|([A-Za-z_][-A-Za-z0-9_.]*[-A-Za-z0-9_])(texprRRR(RRf((RRìscCsti||ƒiƒS(N(RR RRR'(RR((RR ÷s(R R RR (((RReës cCs>tii|ƒ}tii|ƒo|Sntd|‚dS(Ns%s is not an existing directory(RTtpatht expanduserR tnvtisdirR(R Ri((Rtexisting_directoryúscCs>tii|ƒ}tii|ƒo|Sntd|‚dS(Ns%s is not an existing path(RTRgRhR RitexistsR(R Ri((Rt existing_pathscCs>tii|ƒ}tii|ƒo|Sntd|‚dS(Ns%s is not an existing file(RTRgRhR RiRlR(R Ri((Rt existing_filescCs_tii|ƒ}tii|ƒ}|p|Sntii|ƒo|Sntd|‚dS(Ns:The directory named as part of the path %s does not exist.( RTRgRhR RitdirnametdirRjR(R RpRi((Rtexisting_dirpath stSuffixMultipliercBstZdd„Zd„ZRS(NicCsv||_||_d|_xT|iƒD]F}|idjot |ƒ|_q(|it |ƒjpt ‚q(WdS(N( tdRt_dtdefaultt_defaultRt_keysztkeystkRLtAssertionError(RRsRuRy((RRs    cCsl|iƒ}xL|iiƒD];\}}||i |jot||i ƒ|SqqWt|ƒ|i S(N( R R'RRttitemsR=RRwR2Rv(RR RR=((RR 's   (R R RR (((RRrs c Csød}}}}}x·|iƒD]©}t|d ƒ}|d}|djo |}q#|djo |}q#|djo |}q#|djo |}q#|djo |}q#t d||fƒ‚q#Wt i d |d |d |d |d |ƒS(NiiÿÿÿÿtwRsthRR=sbad part %s in %stweekstdaysthourstminutestseconds(R~RR€RR‚R=RBtpartRctvaltsuffixt TypeErrortdatetimet timedelta( R=R…R„R‚RR€RƒR~R((RRˆ/s$            tbooleans dotted-names dotted-suffixt identifierR5Rctstrings string-listtnullRs port-numbers basic-keys inet-addresssinet-binding-addresssinet-connection-addressssocket-addressssocket-binding-addressssocket-connection-addresssipaddr-or-hostnamesexisting-directorys existing-paths existing-filesexisting-dirpaths byte-sizetkbitmbtgbls time-intervalR=Ri<R}RsiRˆtRegistrycBs/tZdd„Zd„Zd„Zd„ZRS(NcCs<|djotiƒ}n||_h|_d|_dS(N(tstockRtstock_datatypestcopyRt_stockt_othert _basic_key(RR‘((RRzs    cCsìd|jo†|idjoc|iidƒ|_|idjo|iidƒ|_n|idjotd|_q€n|i|ƒ}n|ii|ƒ}|djo6|ii|ƒ}|djo|i |ƒ}qèn|S(Nt.s basic-key( tnameRR–RR•tgetR”R’tttsearch(RR˜Rš((RR™s   cCsa|ii|ƒotd| ƒ‚n|ii|ƒotd| ƒ‚n||i|