%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/xmlrpclib.pyo


Mac@sdZddlZddlZddlZddlZddlTddlZddlZddlZyddl	Z	Wne
k
rdZ	nXyeWne
k
rdZnXyddlZWne
k
rdZnXyejjdkZWne
k
r	dZnXejdjdZejdZerCd	Zn	d
ZdZdXZdZZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'de(fdYZ)de)fdYZ*de)fdYZ+de)fd YZ,dd!l-m.Z.e.ej/Z0erBe1Z2Z3e4e0d"<ee0d#<nEd$d[d%YZ3e3de0d"<e3de0d#<ee4fd&Z2[.[0d'Z5d(d\d)YZ6d*Z7d+Z8ddl9Z9yddl:Z;Wne
k
rddl;Z;nXd,d]d-YZ<d.Z=e6e<fZ>es5e>e3fZ>ny"ddl?Z?e?j@ZAe?jBZCWn!eDe
fk
rzdZAZCnXyddl?Z?e?jEZFWneDe
fk
rdZFnXy,dd/lGmHZHeIeHd0se
nWne
k
rdZJnXd1d^d2YZJd3d_d4YZKd5d`d6YZEd7dad8YZBd9dbd:YZLd;dcd<YZMd=ddd>YZNdd?ZOddddd@ZPddAZQdBZRdCdDZSdEe	re	jTneUfdFYZVdGdedHYZWdIdfdJYZXdKeXfdLYZYdMdgdNYZZeZZ[edOkreZdPZ\e\GHeNe\Z]e]j^dQdRe]j_dSde]j_dTdUyxe]D]Z`e`GHqWWqe)k
rZadVGeaGHqXndS(hs~
An XML-RPC client interface for Python.

The marshalling and response parser code can also be used to
implement XML-RPC servers.

Exported exceptions:

  Error          Base class for client errors
  ProtocolError  Indicates an HTTP protocol error
  ResponseError  Indicates a broken response package
  Fault          Indicates an XML-RPC fault package

Exported classes:

  ServerProxy    Represents a logical connection to an XML-RPC server

  MultiCall      Executor of boxcared xmlrpc requests
  Boolean        boolean wrapper to generate a "boolean" XML-RPC value
  DateTime       dateTime wrapper for an ISO 8601 string or time tuple or
                 localtime integer value to generate a "dateTime.iso8601"
                 XML-RPC value
  Binary         binary data wrapper

  SlowParser     Slow but safe standard parser (based on xmllib)
  Marshaller     Generate an XML-RPC params chunk from a Python data structure
  Unmarshaller   Unmarshal an XML-RPC response from incoming XML event message
  Transport      Handles an HTTP transaction to an XML-RPC server
  SafeTransport  Handles an HTTPS transaction to an XML-RPC server

Exported constants:

  True
  False

Exported functions:

  boolean        Convert any Python value to an XML-RPC boolean
  getparser      Create instance of the fastest available parser & attach
                 to an unmarshalling object
  dumps          Convert an argument tuple or a Fault instance to an XML-RPC
                 request (or response, if the methodresponse option is used).
  loads          Convert an XML-RPC packet to unmarshalled data plus a method
                 name (None if not present).
iN(t*tboolis[-]cCs.tr*|r*||r*t||}n|S(N(tunicode(tdatatencodingtis8bit((s%/usr/local/lib/python2.7/xmlrpclib.pyt_decodescCs4||dd}||dd}||ddS(Nt&s&amp;t<s&lt;t>s&gt;((tstreplace((s%/usr/local/lib/python2.7/xmlrpclib.pytescapescCs*y|jdSWntk
r%|SXdS(Ntascii(tencodetUnicodeError(tstring((s%/usr/local/lib/python2.7/xmlrpclib.pyt
_stringifys
cCs|S(N((R((s%/usr/local/lib/python2.7/xmlrpclib.pyRss1.0.1liiiDiiipiԁiCiBiiitErrorcBseZdZdZRS(sBase class for client errors.cCs
t|S(N(trepr(tself((s%/usr/local/lib/python2.7/xmlrpclib.pyt__str__s(t__name__t
__module__t__doc__R(((s%/usr/local/lib/python2.7/xmlrpclib.pyRst
ProtocolErrorcBs eZdZdZdZRS(s!Indicates an HTTP protocol error.cCs5tj|||_||_||_||_dS(N(Rt__init__turlterrcodeterrmsgtheaders(RRRRR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs

			cCsd|j|j|jfS(Ns<ProtocolError for %s: %s %s>(RRR(R((s%/usr/local/lib/python2.7/xmlrpclib.pyt__repr__s(RRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	t
ResponseErrorcBseZdZRS(s$Indicates a broken response package.(RRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyR stFaultcBs eZdZdZdZRS(s#Indicates an XML-RPC fault package.cKs#tj|||_||_dS(N(RRt	faultCodetfaultString(RR"R#textra((s%/usr/local/lib/python2.7/xmlrpclib.pyRs
	cCsd|jt|jfS(Ns<Fault %s: %s>(R"RR#(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRs(RRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyR!s	(tmodulestTruetFalsetBooleancBsGeZdZddZdZdZdZdZdZRS(saBoolean-value wrapper.

        Use True or False to generate a "boolean" XML-RPC value.
        icCstj||_dS(N(toperatorttruthtvalue(RR+((s%/usr/local/lib/python2.7/xmlrpclib.pyR3scCs|jd|jdS(Ns%<value><boolean>%d</boolean></value>
(twriteR+(Rtout((s%/usr/local/lib/python2.7/xmlrpclib.pyR6scCs+t|tr|j}nt|j|S(N(t
isinstanceR(R+tcmp(Rtother((s%/usr/local/lib/python2.7/xmlrpclib.pyt__cmp__9scCs)|jrdt|Sdt|SdS(Ns<Boolean True at %x>s<Boolean False at %x>(R+tid(R((s%/usr/local/lib/python2.7/xmlrpclib.pyR>s	cCs|jS(N(R+(R((s%/usr/local/lib/python2.7/xmlrpclib.pyt__int__DscCs|jS(N(R+(R((s%/usr/local/lib/python2.7/xmlrpclib.pyt__nonzero__Gs(	RRRRRR1RR3R4(((s%/usr/local/lib/python2.7/xmlrpclib.pyR(-s				cCs|tj|S(s.Convert any Python value to XML-RPC 'boolean'.(R)R*(R+t
_truefalse((s%/usr/local/lib/python2.7/xmlrpclib.pytbooleanXscCstrGt|tjrGd|j|j|j|j|j|jfSnt|tt	j
fs|dkrzt	j	}nt	j|}nd|d S(Ns%04d%02d%02dT%02d:%02d:%02dii(tdatetimeR.tyeartmonthtdaythourtminutetsecondt	TupleTypettimetstruct_timet	localtime(R+((s%/usr/local/lib/python2.7/xmlrpclib.pyt	_strftimekstDateTimecBseZdZddZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZRS(sDateTime wrapper for an ISO 8601 string or time tuple or
    localtime integer value to generate 'dateTime.iso8601' XML-RPC
    value.
    icCs.t|tr||_nt||_dS(N(R.t
StringTypeR+RB(RR+((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCst|tr$|j}|j}ntrWt|tjrW|j}|jd}nt|trx|j}|}nmt|dr|j}|j}nCt|dr|jj	pt
|}td|jj	|f||fS(Ns%Y%m%dT%H:%M:%St	timetuplet	__class__sCan't compare %s and %s(R.RCR+R7tstrftimet
basestringthasattrRERFRttypet	TypeError(RR0R
tototype((s%/usr/local/lib/python2.7/xmlrpclib.pytmake_comparables$				cCs|j|\}}||kS(N(RN(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyt__lt__scCs|j|\}}||kS(N(RN(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyt__le__scCs|j|\}}||kS(N(RN(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyt__gt__scCs|j|\}}||kS(N(RN(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyt__ge__scCs|j|\}}||kS(N(RN(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyt__eq__scCs|j|\}}||kS(N(RN(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyt__ne__scCstj|jdS(Ns%Y%m%dT%H:%M:%S(R?tstrptimeR+(R((s%/usr/local/lib/python2.7/xmlrpclib.pyREscCs"|j|\}}t||S(N(RNR/(RR0R
RL((s%/usr/local/lib/python2.7/xmlrpclib.pyR1scCs|jS(N(R+(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCsdt|jt|fS(Ns<DateTime %s at %x>(RR+R2(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCs"t|}tj||_dS(N(tstrRtstripR+(RR((s%/usr/local/lib/python2.7/xmlrpclib.pytdecodescCs.|jd|j|j|jddS(Ns<value><dateTime.iso8601>s</dateTime.iso8601></value>
(R,R+(RR-((s%/usr/local/lib/python2.7/xmlrpclib.pyRs
(RRRRRNRORPRQRRRSRTRER1RRRXR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRCys													cCst}|j||S(N(RCRX(RR+((s%/usr/local/lib/python2.7/xmlrpclib.pyt	_datetimes	
cCs)tj|d}tjt|d S(Ns%Y%m%dT%H:%M:%Si(R?RUR7ttuple(Rtt((s%/usr/local/lib/python2.7/xmlrpclib.pyt_datetime_typestBinarycBs>eZdZddZdZdZdZdZRS(sWrapper for binary data.cCs
||_dS(N(R(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCs
|jpdS(Nt(R(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCs+t|tr|j}nt|j|S(N(R.R]RR/(RR0((s%/usr/local/lib/python2.7/xmlrpclib.pyR1scCstj||_dS(N(tbase64tdecodestringR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRXscCs:|jdtjtj|j||jddS(Ns<value><base64>
s</base64></value>
(R,R_RtStringIOR(RR-((s%/usr/local/lib/python2.7/xmlrpclib.pyRs
N(	RRRtNoneRRR1RXR(((s%/usr/local/lib/python2.7/xmlrpclib.pyR]s			cCst}|j||S(N(R]RX(RR+((s%/usr/local/lib/python2.7/xmlrpclib.pyt_binarys	
(texpattParserCreatetExpatParsercBs#eZdZdZdZRS(cCsrtjdd|_}||_|j|_|j|_|j	|_
d}|js^d}n|j|ddS(Nsutf-8(
RdReRbt_parsert_targettstarttStartElementHandlertendtEndElementHandlerRtCharacterDataHandlertreturns_unicodetxml(RttargettparserR((s%/usr/local/lib/python2.7/xmlrpclib.pyR"s			cCs|jj|ddS(Ni(RgtParse(RR((s%/usr/local/lib/python2.7/xmlrpclib.pytfeed-scCsAy
|j}Wntk
r nX|`|`|jdddS(NR^i(RgtAttributeErrorRhRr(RRq((s%/usr/local/lib/python2.7/xmlrpclib.pytclose0s

(RRRRsRu(((s%/usr/local/lib/python2.7/xmlrpclib.pyRf s		t
SlowParsercBseZdZdZRS(s/Default XML parser (based on xmllib.XMLParser).cCsddl}|jtjkr0|jft_n|j|_|j|_|j|_	|j|_
|j|_y|jj
|ddWn!tk
r|jj
|nXdS(Nitaccept_utf8i(txmllibt	XMLParserRvt	__bases__Rot
handle_xmlRitunknown_starttagRthandle_datathandle_cdataRktunknown_endtagRRK(RRpRx((s%/usr/local/lib/python2.7/xmlrpclib.pyR<s
(RRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRv9st
MarshallercBs7eZdZdddZiZdZdZdZeee	<dZ
e
ee<erudZ
e
ee<ndZeee<d	Zeee<ed
Zeee<eredZeee<ndZeee<eee<ed
Zeee<er"dZeeej<ndZ e ee!<RS(svGenerate an XML-RPC params chunk from a Python data structure.

    Create a Marshaller instance for each set of parameters, and use
    the "dumps" method to convert your data (represented as a tuple)
    to an XML-RPC params chunk.  To write a fault response, pass a
    Fault instance instead.  You may prefer to use the "dumps" module
    function for this purpose.
    icCs(i|_d|_||_||_dS(N(tmemoRbRRt
allow_none(RRR((s%/usr/local/lib/python2.7/xmlrpclib.pyRas			cCsg}|j}|j}t|tr_|d|i|jd6|jd6||dnF|dx/|D]'}|d||||dqpW|dtj|d	}|S(
Ns<fault>
R"R#s	</fault>
s	<params>
s<param>
s	</param>
s
</params>
R^(tappendt_Marshaller__dumpR.R!R"R#Rtjoin(RtvaluesR-R,tdumptvtresult((s%/usr/local/lib/python2.7/xmlrpclib.pytdumpsis"		







cCsy|jt|}Wntk
ry|jWntdt|nXxBt|jD]1}||jjkr_tdt|q_q_W|jt}nX||||dS(Nscannot marshal %s objects(tdispatchRJtKeyErrort__dict__RKt__mro__tkeystInstanceType(RR+R,tfttype_((s%/usr/local/lib/python2.7/xmlrpclib.pyt__dumps
cCs#|jstdn|ddS(Ns0cannot marshal None unless allow_none is enableds<value><nil/></value>(RRK(RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pytdump_nils	cCsL|tks|tkr$tdn|d|t||ddS(Nsint exceeds XML-RPC limitss<value><int>s</int></value>
(tMAXINTtMININTt
OverflowErrorRV(RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pytdump_ints

cCs.|d||rdpd|ddS(Ns<value><boolean>t1t0s</boolean></value>
((RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pyt	dump_bools
cCsR|tks|tkr$tdn|d|tt||ddS(Nslong int exceeds XML-RPC limitss<value><int>s</int></value>
(RRRRVtint(RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pyt	dump_longs

cCs(|d|t||ddS(Ns<value><double>s</double></value>
(R(RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pytdump_doubles
cCs(|d||||ddS(Ns<value><string>s</string></value>
((RR+R,R((s%/usr/local/lib/python2.7/xmlrpclib.pytdump_strings
cCs7|d|||j|jd|ddS(Ns<value><string>txmlcharrefreplaces</string></value>
(RR(RR+R,R((s%/usr/local/lib/python2.7/xmlrpclib.pytdump_unicodes
cCs}t|}||jkr'tdnd|j|<|j}|dx|D]}|||qNW|d|j|=dS(Ns"cannot marshal recursive sequencess<value><array><data>
s</data></array></value>
(R2RRKRbR(RR+R,tiRR((s%/usr/local/lib/python2.7/xmlrpclib.pyt
dump_arrays
	


cCst|}||jkr'tdnd|j|<|j}|dx|jD]\}}|dt|tkr||}n?trt|t	kr||j
|jd}n	td|d|||||dqTW|d|j|=dS(	Ns%cannot marshal recursive dictionariess<value><struct>
s	<member>
Rsdictionary key must be strings<name>%s</name>
s
</member>
s</struct></value>
(R2RRKRbRtitemsRJRDRtUnicodeTypeRR(RR+R,RRRtkR((s%/usr/local/lib/python2.7/xmlrpclib.pytdump_structs$
	

	

cCs(|d|t||ddS(Ns<value><dateTime.iso8601>s</dateTime.iso8601></value>
(RB(RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pyt
dump_datetimes
cCsE|jtkr.||_|j||`n|j|j|dS(N(RFtWRAPPERSR,RRR(RR+R,((s%/usr/local/lib/python2.7/xmlrpclib.pyt
dump_instances
	
	N("RRRRbRRRRRtNoneTypeRtIntTypet_bool_is_builtinRRRtLongTypeRt	FloatTypeRRRDRRRRR>tListTypeRtDictTypeR7RRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRTs>			
	
	
	
	


	


			tUnmarshallercBszeZdZddZdZdZdZdZdZe	j
dZd	ZiZ
d
Zee
d<dZee
d
<dZee
d<ee
d<ee
d<dZee
d<dZee
d<ee
d<dZee
d<dZee
d<dZee
d<dZee
d<dZee
d <d!Zee
d"<d#Zee
d$<d%Zee
d&<RS('sUnmarshal an XML-RPC response, based on incoming XML event
    messages (start, data, end).  Call close() to get the resulting
    data structure.

    Note that this reader is fairly tolerant, and gladly accepts bogus
    XML-RPC data without complaining (but not bogus XML).
    icCstd|_g|_g|_g|_t|_d|_d|_|jj	|_	||_
|rptrptdndS(Nsutf-8s$the datetime module is not available(
Rbt_typet_stackt_markst_dataR't_valuet_methodnamet	_encodingRt
_use_datetimeR7t
ValueError(Rtuse_datetime((s%/usr/local/lib/python2.7/xmlrpclib.pyRs								
cCsV|jdks|jr$tn|jdkrIt|jdnt|jS(Ntfaulti(RRbRR R!RRZ(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRus
cCs|jS(N(R(R((s%/usr/local/lib/python2.7/xmlrpclib.pyt
getmethodname#scCs
||_dS(N(R(RRt
standalone((s%/usr/local/lib/python2.7/xmlrpclib.pyRo)scCs{|dks|dkr4|jjt|jng|_|jrh||jkrhtd|n|dk|_dS(Ntarraytstructsunknown tag %rR+(RRtlenRRRRR (Rttagtattrs((s%/usr/local/lib/python2.7/xmlrpclib.pyRi-s	cCs|jj|dS(N(RR(Rttext((s%/usr/local/lib/python2.7/xmlrpclib.pyR6scCsBy|j|}Wntk
r$nX||||jdSdS(NR^(RRR(RRRR((s%/usr/local/lib/python2.7/xmlrpclib.pyRk9s

cCs6y|j|}Wntk
r$nX|||SdS(N(RR(RRRR((s%/usr/local/lib/python2.7/xmlrpclib.pytend_dispatchEs

cCs|jdd|_dS(Ni(RRbR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pytend_nilSs
tnilcCsN|dkr|jtn%|dkr8|jtn	tdd|_dS(NRRsbad boolean valuei(RR'R&RKR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pytend_booleanXs	R6cCs |jt|d|_dS(Ni(RRR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pytend_intbsti4ti8RcCs |jt|d|_dS(Ni(RtfloatR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyt
end_doubleistdoublecCs>|jrt||j}n|jt|d|_dS(Ni(RRRRR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyt
end_stringns	RtnamecCs3|jj}|j|g|j|)d|_dS(Ni(RtpopRR(RRtmark((s%/usr/local/lib/python2.7/xmlrpclib.pyt	end_arrayvsRcCs~|jj}i}|j|}x<tdt|dD]"}||d|t||<q;W|g|j|)d|_dS(Niii(RRRtrangeRRR(RRRtdictRR((s%/usr/local/lib/python2.7/xmlrpclib.pyt
end_struct}s
 RcCs0t}|j||j|d|_dS(Ni(R]RXRR(RRR+((s%/usr/local/lib/python2.7/xmlrpclib.pyt
end_base64s	

R_cCs?t}|j||jr.t|}n|j|dS(N(RCRXRR\R(RRR+((s%/usr/local/lib/python2.7/xmlrpclib.pytend_dateTimes
	
	sdateTime.iso8601cCs|jr|j|ndS(N(RR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyt	end_values	R+cCs
d|_dS(Ntparams(R(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyt
end_paramssRcCs
d|_dS(NR(R(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyt	end_faultsRcCs4|jrt||j}n||_d|_dS(Nt
methodName(RRRR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pytend_methodNames		R(RRRRRuRRoRiRRRRkRRRRRRRRRRRRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRsN
								
	
	


	
	

	
		
	
	
	
	
	
	t_MultiCallMethodcBs#eZdZdZdZRS(cCs||_||_dS(N(t_MultiCallMethod__call_listt_MultiCallMethod__name(Rt	call_listR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	cCst|jd|j|fS(Ns%s.%s(RRR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyt__getattr__scGs|jj|j|fdS(N(RRR(Rtargs((s%/usr/local/lib/python2.7/xmlrpclib.pyt__call__s(RRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs		tMultiCallIteratorcBs eZdZdZdZRS(saIterates over the results of a multicall. Exceptions are
    raised in response to xmlrpc faults.cCs
||_dS(N(tresults(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCsl|j|}t|tikr?t|d|dn)t|tgkr_|dStddS(NR"R#is#unexpected type in multicall result(RRJR!R(RRtitem((s%/usr/local/lib/python2.7/xmlrpclib.pyt__getitem__s
(RRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	t	MultiCallcBs8eZdZdZdZeZdZdZRS(s~server -> an object used to boxcar method calls

    server should be a ServerProxy object.

    Methods can be added to the MultiCall using normal
    method call syntax e.g.:

    multicall = MultiCall(server_proxy)
    multicall.add(2,3)
    multicall.get_address("Guido")

    To execute the multicall, call the MultiCall object e.g.:

    add_result, address = multicall()
    cCs||_g|_dS(N(t_MultiCall__servert_MultiCall__call_list(Rtserver((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	cCsdt|S(Ns<MultiCall at %x>(R2(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCst|j|S(N(RR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCsTg}x2|jD]'\}}|ji|d6|d6qWt|jjj|S(NRR(RRRRtsystemt	multicall(Rtmarshalled_listRR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs(RRRRRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs			cCs|rtrtdntratra|r4t}nt}tttt|t	}t|}nEt
d|}trt|}n!trt|}nt|}||fS(sgetparser() -> parser, unmarshaller

    Create an instance of the fastest available parser, and attach it
    to an unmarshalling object.  Return both objects.
    s$the datetime module is not availableR(
R7Rt
FastParsertFastUnmarshallerR\RYR&R'RcR!RRfRv(Rt
mkdatetimeRpRq((s%/usr/local/lib/python2.7/xmlrpclib.pyt	getparsers
	cCst|trd}n|r0t|tr0n|s?d}ntrTt|}nt||}|j|}|dkrdt|}nd}|rt|ts|j|d}n|d|d|df}n|r|d	|d
f}n|St	j
|dS(sdata [,options] -> marshalled data

    Convert an argument tuple or a Fault instance to an XML-RPC
    request (or response, if the methodresponse option is used).

    In addition to the data object, the following options can be given
    as keyword arguments:

        methodname: the method name for a methodCall packet

        methodresponse: true to create a methodResponse packet.
        If this option is used with a tuple, the tuple must be
        a singleton (i.e. it can contain only one element).

        encoding: the packet encoding (default is UTF-8)

    All 8-bit strings in the data structure are assumed to use the
    packet encoding.  Unicode strings are automatically converted,
    where necessary.
    isutf-8s$<?xml version='1.0' encoding='%s'?>
s<?xml version='1.0'?>
Rs<methodCall>
<methodName>s</methodName>
s</methodCall>
s<methodResponse>
s</methodResponse>
R^(R.R!R>tFastMarshallerRRRVRDRRR(Rt
methodnametmethodresponseRRtmRt	xmlheader((s%/usr/local/lib/python2.7/xmlrpclib.pyRs8		cCsBtd|\}}|j||j|j|jfS(sdata -> unmarshalled data, method name

    Convert an XML-RPC packet to unmarshalled data plus a method
    name (None if not present).

    If the XML-RPC packet represents a fault condition, this function
    raises a Fault exception.
    R(RRsRuR(RRtptu((s%/usr/local/lib/python2.7/xmlrpclib.pytloadsns	

cCsjtstntj}tjddd|dd}|j||j|j}|j|S(shdata -> gzip encoded data

    Encode data using the gzip content encoding as described in RFC 1952
    tmodetwbtfileobjt
compressleveli(tgziptNotImplementedErrorRatGzipFileR,Rutgetvalue(RRtgzftencoded((s%/usr/local/lib/python2.7/xmlrpclib.pytgzip_encodes	


i@cCststntj|}tjddd|}y2|dkrT|j}n|j|d}Wntk
rtdnX|j|j|dkrt||krtdn|S(srgzip encoded data -> unencoded data

    Decode data using the gzip content encoding as described in RFC 1952
    RtrbRiisinvalid datas#max gzipped payload length exceeded(	RRRaRtreadtIOErrorRRuR(Rt
max_decodeRRtdecoded((s%/usr/local/lib/python2.7/xmlrpclib.pytgzip_decodes	


tGzipDecodedResponsecBs eZdZdZdZRS(sha file-like object to decode a response encoded with the gzip
    method, as described in RFC 1952.
    cCsJtstntj|j|_tjj|ddd|jdS(NRR	R(RRRaR
tstringioRR(Rtresponse((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	cCs)ztjj|Wd|jjXdS(N(RRRuR(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRus(RRRRRu(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	t_MethodcBs#eZdZdZdZRS(cCs||_||_dS(N(t
_Method__sendt
_Method__name(RtsendR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs	cCst|jd|j|fS(Ns%s.%s(RRR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRscGs|j|j|S(N(RR(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs(RRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs		t	TransportcBseZdZdeZeZdZddZ	ddZ
ddZdZdZ
dZd	Zd
ZdZdZd
ZdZRS(s1Handles an HTTP transaction to an XML-RPC server.s'xmlrpclib.py/%s (by www.pythonware.com)icCs||_d|_g|_dS(N(NN(RRbt_connectiont_extra_headers(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs		cCsxdD]}y|j||||SWqtjk
rl}|sc|jtjtjtjfkrqqtjk
r|rqqXqWdS(Nii(ii(	tsingle_requesttsocketterrorterrnot
ECONNRESETtECONNABORTEDtEPIPEthttplibt
BadStatusLine(Rthostthandlertrequest_bodytverboseRte((s%/usr/local/lib/python2.7/xmlrpclib.pytrequests
'	cCs|j|}|r%|jdny{|j||||j|||j||j|||jdt}|jdkr||_	|j
|SWn1tk
rntk
r|j
nX|jddr|jnt|||j|j|jdS(Nit	bufferingiscontent-lengthi(tmake_connectiontset_debugleveltsend_requestt	send_hosttsend_user_agenttsend_contenttgetresponseR&tstatusR%tparse_responseR!t	ExceptionRut	getheaderR
Rtreasontmsg(RR"R#R$R%thR((s%/usr/local/lib/python2.7/xmlrpclib.pyRs.
	



cCstd|jS(NR(RR(R((s%/usr/local/lib/python2.7/xmlrpclib.pyR;scCsi}t|tr$|\}}nddl}|j|\}}|rddl}|j|j|}tjtj	|d}dd|fg}nd}|||fS(NiR^t
AuthorizationsBasic (R.R>turllibt	splituserR_tencodestringtunquoteRRtsplitRb(RR"tx509R8tauthR_t
extra_headers((s%/usr/local/lib/python2.7/xmlrpclib.pyt
get_host_infoIscCse|jr'||jdkr'|jdS|j|\}|_}|tj|f|_|jdS(Nii(RR@RR tHTTPConnection(RR"tchostR=((s%/usr/local/lib/python2.7/xmlrpclib.pyR)ds
cCs/|j\}}|r+d|_|jndS(N(NN(RRbRu(RR"t
connection((s%/usr/local/lib/python2.7/xmlrpclib.pyRuts	cCsL|jr8tr8|jd|dt|jddn|jd|dS(NtPOSTtskip_accept_encodingsAccept-EncodingR(taccept_gzip_encodingRt
putrequestR&t	putheader(RRCR#R$((s%/usr/local/lib/python2.7/xmlrpclib.pyR+scCs[|j}|rWt|tr-|j}nx'|D]\}}|j||q4WndS(N(RR.RRRH(RRCR"R?tkeyR+((s%/usr/local/lib/python2.7/xmlrpclib.pyR,s	cCs|jd|jdS(Ns
User-Agent(RHt
user_agent(RRC((s%/usr/local/lib/python2.7/xmlrpclib.pyR-scCs|jdd|jdk	rY|jt|krYtrY|jddt|}n|jdtt||j|dS(NsContent-Typestext/xmlsContent-EncodingRsContent-Length(RHtencode_thresholdRbRRRRVt
endheaders(RRCR$((s%/usr/local/lib/python2.7/xmlrpclib.pyR.scCst|dr?|jdddkr6t|}qE|}n|}|j\}}xE|jd}|ssPn|jrdGt|GHn|j|qZW||k	r|jn|j|jS(NR3sContent-EncodingR^Risbody:(	RIR3RRR
R%RRsRu(RRtstreamRRR((s%/usr/local/lib/python2.7/xmlrpclib.pyR1s"		

N(RRRt__version__RJR&RFRbRKRR'RRR@R)RuR+R,R-R.R1(((s%/usr/local/lib/python2.7/xmlrpclib.pyRs 
'				
		
			t
SafeTransportcBs&eZdZdddZdZRS(s2Handles an HTTPS transaction to an XML-RPC server.icCs tj|d|||_dS(NR(RRtcontext(RRRP((s%/usr/local/lib/python2.7/xmlrpclib.pyRscCs|jr'||jdkr'|jdSy
tj}Wntk
rStdnQX|j|\}|_}|||dd|j|pif|_|jdSdS(Niis-your version of httplib doesn't support HTTPSRP(	RR tHTTPSConnectionRtRR@RRbRP(RR"tHTTPSRBR=((s%/usr/local/lib/python2.7/xmlrpclib.pyR)s


*N(RRRRbRR)(((s%/usr/local/lib/python2.7/xmlrpclib.pyROstServerProxycBs\eZdZdddddddZdZdZdZeZdZ	dZ
RS(	suri [,options] -> a logical connection to an XML-RPC server

    uri is the connection point on the server, given as
    scheme://host/target.

    The standard implementation always supports the "http" scheme.  If
    SSL socket support is available (Python 2.0), it also supports
    "https".

    If the target part and the slash preceding it are both omitted,
    "/RPC2" is assumed.

    The following options can be given as keyword arguments:

        transport: a transport factory
        encoding: the request encoding (default is UTF-8)

    All 8-bit strings passed to the server proxy are assumed to use
    the given encoding.
    ic
Cstr't|tr'|jd}nddl}|j|\}	}|	d	kr`tdn|j|\|_|_|jsd|_n|dkr|	dkrt
d|d|}qtd|}n||_||_
||_||_dS(
Ns
ISO-8859-1ithttpthttpssunsupported XML-RPC protocols/RPC2RRP(RTRU(RR.RR8t	splittypeRt	splithostt_ServerProxy__hostt_ServerProxy__handlerRbRORt_ServerProxy__transportt_ServerProxy__encodingt_ServerProxy__verboset_ServerProxy__allow_none(
Rturit	transportRR%RRRPR8RJ((s%/usr/local/lib/python2.7/xmlrpclib.pyRs"				cCs|jjdS(N(RZRu(R((s%/usr/local/lib/python2.7/xmlrpclib.pyt__close5scCskt||d|jd|j}|jj|j|j|d|j}t|dkrg|d}n|S(NRRR%ii(	RR[R]RZR'RXRYR\R(RRRR'R((s%/usr/local/lib/python2.7/xmlrpclib.pyt	__request8s	
cCsd|j|jfS(Ns<ServerProxy for %s%s>(RXRY(R((s%/usr/local/lib/python2.7/xmlrpclib.pyRJscCst|j|S(N(Rt_ServerProxy__request(RR((s%/usr/local/lib/python2.7/xmlrpclib.pyRRscCs=|dkr|jS|dkr&|jStd|fdS(s|A workaround to get special attributes on the ServerProxy
           without interfering with the magic __getattr__
        RuR_sAttribute %r not foundN(t_ServerProxy__closeRZRt(Rtattr((s%/usr/local/lib/python2.7/xmlrpclib.pyRYs
N(RRRRbRRcRbRRRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyRSs					t__main__shttp://localhost:8000ii	iiitERRORllll((((((((((((((bRtreRR?R)ttypesRRR RtImportErrorRbRt	NameErrorR7R'RFRRtcompiletsearchRRRRRNRRtPARSE_ERRORtSERVER_ERRORtAPPLICATION_ERRORtSYSTEM_ERRORtTRANSPORT_ERRORtNOT_WELLFORMED_ERRORtUNSUPPORTED_ENCODINGtINVALID_ENCODING_CHARtINVALID_XMLRPCtMETHOD_NOT_FOUNDtINVALID_METHOD_PARAMStINTERNAL_ERRORR2RRR R!tsysR%Rtmod_dictRR6R(R&RBRCRYR\R_t	cStringIORaR]RcRt
_xmlrpclibtParserRRRRtRRtxml.parsersRdRIRfRvRRRRRRRRRtobjectRRRRORStServerRtmultitpowtaddRR(((s%/usr/local/lib/python2.7/xmlrpclib.pyt<module>s0








	





	T		

		





-&	N	%*a


Zerion Mini Shell 1.0