python (3.12.0)

(root)/
lib/
python3.12/
xmlrpc/
__pycache__/
server.cpython-312.pyc

͑e֏HdZddlmZmZmZmZmZddlmZddl	m
Z
ddlmZddl
Z
ddlZddlZddlZddlZddlZddlZddlZ	ddlZd(dZd	ZGd
dZGdd
eZGddej6eZGddeZGddeZGddej>Z GddZ!GddeZ"Gddee!Z#Gddee!Z$e%dk(rddl&Z&Gdd Z'ed!5Z(e(jSe*e(jSd"d#e(jWe'd$e(jYe-d%e-d&	e(j]dddyy#e$rdZY'wxYw#e/$re-d'ej`dY9wxYw#1swYyxYw))aXML-RPC Servers.

This module can be used to create simple XML-RPC servers
by creating a server and either installing functions, a
class instance, or by extending the SimpleXMLRPCServer
class.

It can also be used to handle XML-RPC requests in a CGI
environment using CGIXMLRPCRequestHandler.

The Doc* classes can be used to create XML-RPC servers that
serve pydoc-style documentation in response to HTTP
GET requests. This documentation is dynamically generated
based on the functions and methods registered with the
server.

A list of possible usage patterns follows:

1. Install functions:

server = SimpleXMLRPCServer(("localhost", 8000))
server.register_function(pow)
server.register_function(lambda x,y: x+y, 'add')
server.serve_forever()

2. Install an instance:

class MyFuncs:
    def __init__(self):
        # make all of the sys functions available through sys.func_name
        import sys
        self.sys = sys
    def _listMethods(self):
        # implement this method so that system.listMethods
        # knows to advertise the sys methods
        return list_public_methods(self) + \
                ['sys.' + method for method in list_public_methods(self.sys)]
    def pow(self, x, y): return pow(x, y)
    def add(self, x, y) : return x + y

server = SimpleXMLRPCServer(("localhost", 8000))
server.register_introspection_functions()
server.register_instance(MyFuncs())
server.serve_forever()

3. Install an instance with custom dispatch method:

class Math:
    def _listMethods(self):
        # this method must be present for system.listMethods
        # to work
        return ['add', 'pow']
    def _methodHelp(self, method):
        # this method must be present for system.methodHelp
        # to work
        if method == 'add':
            return "add(2,3) => 5"
        elif method == 'pow':
            return "pow(x, y[, z]) => number"
        else:
            # By convention, return empty
            # string if no help is available
            return ""
    def _dispatch(self, method, params):
        if method == 'pow':
            return pow(*params)
        elif method == 'add':
            return params[0] + params[1]
        else:
            raise ValueError('bad method')

server = SimpleXMLRPCServer(("localhost", 8000))
server.register_introspection_functions()
server.register_instance(Math())
server.serve_forever()

4. Subclass SimpleXMLRPCServer:

class MathServer(SimpleXMLRPCServer):
    def _dispatch(self, method, params):
        try:
            # We are forcing the 'export_' prefix on methods that are
            # callable through XML-RPC to prevent potential security
            # problems
            func = getattr(self, 'export_' + method)
        except AttributeError:
            raise Exception('method "%s" is not supported' % method)
        else:
            return func(*params)

    def export_add(self, x, y):
        return x + y

server = MathServer(("localhost", 8000))
server.serve_forever()

5. CGI script:

server = CGIXMLRPCRequestHandler()
server.register_function(pow)
server.handle_request()
)Faultdumpsloadsgzip_encodegzip_decode)BaseHTTPRequestHandler)partial)	signatureNTc|r|jd}n|g}|D]-}|jdrtd|zt||}/|S)aGresolve_dotted_attribute(a, 'b.c.d') => a.b.c.d

    Resolves a dotted attribute name to an object.  Raises
    an AttributeError if any attribute in the chain starts with a '_'.

    If the optional allow_dotted_names argument is false, dots are not
    supported and this function operates similar to getattr(obj, attr).
    ._z(attempt to access private attribute "%s")split
startswithAttributeErrorgetattr)objattrallow_dotted_namesattrsis     A/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/xmlrpc/server.pyresolve_dotted_attributer|s_

3
!<< :Q>
#a.C
!Jc	t|Dcgc]*}|jdstt||r|,c}Scc}w)zkReturns a list of attribute strings, found in the specified
    object, which represent callable attributesr
)dirrcallabler)rmembers  rlist_public_methodsrsD"%S4v((-WS&12
444s/Ac^eZdZdZ		ddZddZddZdZdZddZ	d	Z
d
ZdZdZ
d
Zy)SimpleXMLRPCDispatchera&Mix-in class that dispatches XML-RPC requests.

    This class is used to register XML-RPC method handlers
    and then to dispatch them. This class doesn't need to be
    instanced directly when used by SimpleXMLRPCServer but it
    can be instanced when used by the MultiPathXMLRPCServer
    NcRi|_d|_||_|xsd|_||_yNutf-8)funcsinstance
allow_noneencodinguse_builtin_typesselfr&r'r(s    r__init__zSimpleXMLRPCDispatcher.__init__s+

$ +G
!2rc ||_||_y)aRegisters an instance to respond to XML-RPC requests.

        Only one instance can be installed at a time.

        If the registered instance has a _dispatch method then that
        method will be called with the name of the XML-RPC method and
        its parameters as a tuple
        e.g. instance._dispatch('add',(2,3))

        If the registered instance does not have a _dispatch method
        then the instance will be searched to find a matching method
        and, if found, will be called. Methods beginning with an '_'
        are considered private and will not be called by
        SimpleXMLRPCServer.

        If a registered function matches an XML-RPC request, then it
        will be called instead of the registered instance.

        If the optional allow_dotted_names argument is true and the
        instance does not have a _dispatch method, method names
        containing dots are supported and resolved, as long as none of
        the name segments start with an '_'.

            *** SECURITY WARNING: ***

            Enabling the allow_dotted_names options allows intruders
            to access your module's global variables and may allow
            intruders to execute arbitrary code on your machine.  Only
            use this option on a secure, closed network.

        N)r%r)r*r%rs   rregister_instancez(SimpleXMLRPCDispatcher.register_instancesB!
"4rcr|t|j|S||j}||j|<|S)zRegisters a function to respond to XML-RPC requests.

        The optional name argument can be used to set a Unicode name
        for the function.
        )name)r	register_function__name__r$)r*functionr/s   rr0z(SimpleXMLRPCDispatcher.register_functions@411==<$$D#

4rc~|jj|j|j|jdy)zRegisters the XML-RPC introspection methods in the system
        namespace.

        see http://xmlrpc.usefulinc.com/doc/reserved.html
        )zsystem.listMethodszsystem.methodSignaturezsystem.methodHelpN)r$updatesystem_listMethodssystem_methodSignaturesystem_methodHelpr*s r register_introspection_functionsz7SimpleXMLRPCDispatcher.register_introspection_functionss7	

$2I2I151L1L,0,B,BD	ErcR|jjd|jiy)zRegisters the XML-RPC multicall method in the system
        namespace.

        see http://www.xmlrpc.com/discuss/msgReader$1208zsystem.multicallN)r$r4system_multicallr8s rregister_multicall_functionsz3SimpleXMLRPCDispatcher.register_multicall_functionss"	

-0E0EFGrc		t||j\}}|
|||}n|j||}|f}t|d|j|j
}|j|j
dS#t$r,}t||j|j
}Yd}~Ld}~wt$rD}tt
dt|d||j
|j}Yd}~d}~wwxYw)	aDispatches an XML-RPC method from marshalled (XML) data.

        XML-RPC methods are dispatched from the marshalled (XML) data
        using the _dispatch method and the result is returned as
        marshalled data. For backwards compatibility, a dispatch
        function can be provided as an argument (see comment in
        SimpleXMLRPCRequestHandler.do_POST) but overriding the
        existing method through subclassing is the preferred means
        of changing method dispatch behavior.
        )r(N)methodresponser&r')r&r':r'r&xmlcharrefreplace)
rr(	_dispatchrr&r'r
BaseExceptiontypeencode)	r*datadispatch_methodpathparamsmethodresponsefaultexcs	         r_marshaled_dispatchz*SimpleXMLRPCDispatcher._marshaled_dispatchs	"44;Q;QRNFF**66:>>&&9 {HXa(,$--QHt}}.ABB	5Ut&*mm5H	aDIs344??H	s$AA<<	C<"B,,C<8:C77C<crt|jj}|j~t	|jdr1|t|jjz}t|St	|jds!|tt
|jz}t|S)zwsystem.listMethods() => ['add', 'subtract', 'multiple']

        Returns a list of the methods supported by the server._listMethodsrC)setr$keysr%hasattrrQrsorted)r*methodss  rr5z)SimpleXMLRPCDispatcher.system_listMethodss
djjoo'(==$t}}n53t}}99;<<gT]]K8324==ABBgrcy)a#system.methodSignature('add') => [double, int, int]

        Returns a list describing the signature of the method. In the
        above example, the add method takes two integers as arguments
        and returns a double result.

        This server does NOT support system.methodSignature.zsignatures not supported)r*method_names  rr6z-SimpleXMLRPCDispatcher.system_methodSignature)s*rczd}||jvr|j|}nu|jit|jdr|jj|St|jds"	t	|j||j
}|ytj|S#t$rY#wxYw)zsystem.methodHelp('add') => "Adds two integers together"

        Returns a string containing documentation for the specified method.N_methodHelprC)	r$r%rTr[rrrpydocgetdoc)r*rYrKs   rr7z(SimpleXMLRPCDispatcher.system_methodHelp6s
$**$ZZ,F
]]
&t}}m4}}00==T]]K85 $

 + $ 7 7"F><<''&s5!B..	B:9B:cTg}|D]/}|d}|d}	|j|j||g1|S#t$r2}|j|j|jdYd}~jd}~wt
$r,}|jdt
|d|dYd}~d}~wwxYw)zsystem.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => [[4], ...]

        Allows the caller to package multiple XML-RPC calls into a single
        request.

        See http://www.xmlrpc.com/discuss/msgReader$1208
        
methodNamerJ)	faultCodefaultStringNr>r@)appendrCrrarbrDrE)r*	call_listresultscallrYrJrMrNs        rr;z'SimpleXMLRPCDispatcher.system_multicallUs	D|,K(^F

{F CDE	$
#(??%*%6%68!
#$04S	3%?A
s!"9	B'(A//B';"B""B'cr	|j|}|||Std|z#t$rYnwxYw|jjt	|jdr|jj||S	t
|j||j}|||S#t$rYnwxYwtd|z)aDispatches the XML-RPC method.

        XML-RPC calls are forwarded to a registered function that
        matches the called XML-RPC method name. If no such function
        exists then the call is forwarded to the registered instance,
        if available.

        If the registered instance has a _dispatch method then that
        method will be called with the name of the XML-RPC method and
        its parameters as a tuple
        e.g. instance._dispatch('add',(2,3))

        If the registered instance does not have a _dispatch method
        then the instance will be searched to find a matching method
        and, if found, will be called.

        Methods beginning with an '_' are considered private and will
        not be called.
        zmethod "%s" is not supportedrC)	r$	ExceptionKeyErrorr%rTrCrrr)r*rKrJfuncs    rrCz SimpleXMLRPCDispatcher._dispatchts*	E::f%DV}$:VCDD		==$t}}k2}}..vv>>

)/MM++#=(	"

6?@@s&	224!B	B('B(FNF)FNN)r1
__module____qualname____doc__r+r-r0r9r<rOr5r6r7r;rCrXrrr r sL37#(3"5H 	EH!CF$*(>>1Arr ceZdZdZdZdZdZdZejdejejzZdZ
dZd	Zd
ZdZddZy
)SimpleXMLRPCRequestHandlerzSimple XML-RPC request handler class.

    Handles all HTTP POST requests and attempts to decode them as
    XML-RPC requests.
    )/z/RPC2
/pydoc.cssixTz
                            \s* ([^\s;]+) \s*            #content-coding
                            (;\s* q \s*=\s* ([0-9\.]+))? #q
                            ci}|jjdd}|jdD]T}|jj	|}|s!|jd}|rt
|nd}|||jd<V|S)NzAccept-Encodingr\,g?r>)headersgetr	aepatternmatchgroupfloat)r*raeer{vs      raccept_encodingsz+SimpleXMLRPCRequestHandler.accept_encodingss
\\

/
4#	&ANN((+EKKN !E!Hs$%%++a.!	&rcL|jr|j|jvSy)NT)	rpc_pathsrIr8s ris_rpc_path_validz,SimpleXMLRPCRequestHandler.is_rpc_path_valids!>>99..rc>|js|jy	d}t|jd}g}|rOt	||}|j
j
|}|sn%|j||t|dz}|rOdj|}|j|}|y|jj|t|dd|j}|jd|j!dd	|j"Xt||j"kDr@|j%j'd
d}|r	t)|}|j!dd
|j!d
t-t||j/|j0j3|y#t*$rY[wxYw#t4$r}	|jdt7|jdrs|jj8r]|j!dt-|	t;j<}
t-|
j?ddd}
|j!d|
|j!d
d|j/Yd}	~	yd}	~	wwxYw)zHandles the HTTP POST request.

        Attempts to interpret all HTTP POST requests as XML-RPC calls,
        which are forwarded to the server's _dispatch method for handling.
        Nizcontent-lengthrtrrCContent-typeztext/xmlgziprzContent-EncodingContent-lengthi_send_traceback_headerzX-exceptionASCIIbackslashreplacezX-traceback0) r
report_404intrxminrfilereadrclenjoindecode_request_contentserverrOrrI
send_responsesend_headerencode_thresholdrryrNotImplementedErrorstrend_headerswfilewriterhrTr	traceback
format_excrF)r*max_chunk_sizesize_remainingL
chunk_sizechunkrGrLqrtraces           rdo_POSTz"SimpleXMLRPCRequestHandler.do_POSTsM%%'OO9	'
*N .>!?@NA  @



3#ae*,
!88A;D..t4D|{{66'$T:DIIH$
s#^Z8$$0x=4#8#88--/33FA>A!'28'<H ,,-?H
-s3x=/ABJJX&	 3! !1
	s#t{{$<=KK66  A7!,,.ELL2DEwO  6-s3
	s7A,G
$G
52G
F>>	G
	G

	JB<JJcv|jjddj}|dk(r|S|dk(r	t|S|jdd|z|jdd	|jy#t$r|jdd|zYCt$r|jddY_wxYw)
Nzcontent-encodingidentityrizencoding %r not supportedzerror decoding gzip contentrr)	rxrylowerrrr
ValueErrorrr)r*rGr's   rrz1SimpleXMLRPCRequestHandler.decode_request_contents<<##$6
CIIKz!Kv
G"4((
s$?($JK)3/'
P""3(Ch(NO
G""3(EF
Gs
A;;B8B87B8c|jdd}|jdd|jdtt||j	|j
j
|y)NisNo such pagerz
text/plainr)rrrrrrrr*rLs  rrz%SimpleXMLRPCRequestHandler.report_404*s]3"6)3s8}+=>

"rc`|jjrtj|||yy)z$Selectively log an accepted request.N)rlogRequestsrlog_request)r*codesizes   rrz&SimpleXMLRPCRequestHandler.log_request3s(;;"""..tT4@#rN)-r)r1rmrnrorrwbufsizedisable_nagle_algorithmrecompileVERBOSE
IGNORECASErzrrrrrrrXrrrqrqsm-IH"

 "$bmm!;=I
	E'N"#Arrqc,eZdZdZdZdZedddddfdZy)SimpleXMLRPCServeragSimple XML-RPC server.

    Simple XML-RPC server that allows functions and a single instance
    to be installed to handle requests. The default implementation
    attempts to dispatch XML-RPC calls to the functions or instance
    installed in the server. Override the _dispatch method inherited
    from SimpleXMLRPCDispatcher to change this behavior.
    TFNc||_tj||||tjj||||yN)rr r+socketserver	TCPServerr*addrrequestHandlerrr&r'bind_and_activater(s        rr+zSimpleXMLRPCServer.__init__Ls<'''j(DUV''dNDUVr)r1rmrnroallow_reuse_addressrrqr+rXrrrr9s,#,F!ed#'5Wrrc8eZdZdZedddddfdZdZdZd	dZy)
MultiPathXMLRPCServera\Multipath XML-RPC Server
    This specialization of SimpleXMLRPCServer allows the user to create
    multiple Dispatcher instances and assign them to different
    HTTP request paths.  This makes it possible to run two or more
    'virtual XML-RPC servers' at the same port.
    Make sure that the requestHandler accepts the paths in question.
    TFNc
ntj||||||||i|_||_|xsd|_yr")rr+dispatchersr&r'rs        rr+zMultiPathXMLRPCServer.__init__]sA	##D$Z$,.?AR	T$ +G
rc$||j|<|Srr)r*rI
dispatchers   radd_dispatcherz$MultiPathXMLRPCServer.add_dispatchergs!+rc |j|Srr)r*rIs  rget_dispatcherz$MultiPathXMLRPCServer.get_dispatcherks%%rc	"	|j|j|||}|S#t$ra}tt	dt|d||j|j}|j|jd}Yd}~|Sd}~wwxYw)Nr>r@rArB)	rrOrDrrrEr'r&rF)r*rGrHrIrLrNs      rrOz)MultiPathXMLRPCServer._marshaled_dispatchns
	K''-AA_d,H	KaDIs344??DH t}}6IJH	Ks $	BAB		Brl)	r1rmrnrorqr+rrrOrXrrrrUs--G!ed#'5,&rrc,eZdZdZddZdZdZddZy)	CGIXMLRPCRequestHandlerz3Simple handler for XML-RPC data passed through CGI.Nc4tj||||yr)r r+r)s    rr+z CGIXMLRPCRequestHandler.__init__s''j(DUVrc\|j|}tdtdt|zttjjtjjj|tjjjy)zHandle a single XML-RPC requestzContent-Type: text/xmlContent-Length: %dN)rOprintrsysstdoutflushbufferr)r*request_textrLs   r
handle_xmlrpcz%CGIXMLRPCRequestHandler.handle_xmlrpcsr++L9
&'
"S]23




)

!rc$d}tj|\}}tjj|||dz}|jd}t
d||fzt
dtjjzt
dt|zt
tjjtjjj|tjjjy)zHandle a single HTTP GET request.

        Default implementation indicates an error because
        XML-RPC uses the POST method.
        r)rmessageexplainr#z
Status: %d %szContent-Type: %srN)r	responseshttprDEFAULT_ERROR_MESSAGErFrDEFAULT_ERROR_CONTENT_TYPErrrrrr)r*rrrrLs     r
handle_getz"CGIXMLRPCRequestHandler.handle_gets1;;DA;;44  
??7+
ow/0
 4;;#I#IIJ
"S]23




)

!rcV|4tjjdddk(r|jy	t	tjjdd}|tjj|}|j|y#t
tf$rd}YFwxYw)zHandle a single XML-RPC request passed through a CGI post method.

        If no XML data is given then it is read from stdin. The resulting
        XML-RPC response is printed to stdout along with the correct HTTP
        headers.
        NREQUEST_METHODGETCONTENT_LENGTHrt)osenvironryrrr	TypeErrorrstdinrr)r*rlengths   rhandle_requestz&CGIXMLRPCRequestHandler.handle_requestsJJNN+T2e;OO
RZZ^^,<dCD#"yy~~f5|,	*

s)BB('B(rkr)r1rmrnror+rrrrXrrrr|s=W
""2-rrc>eZdZdZdiiifdZdiiidfdZdZdZy)
ServerHTMLDocz7Class used to generate pydoc HTML document for a serverNc||xs|j}g}d}tjd}|j||x}	rT|	j	\}
}|j||||
|	j
\}}
}}}}|
r1||jdd}|jd|d|dn|r-dt|z}|jd|d||dn|r-d	t|z}|jd|d||dng|||d
zdk(r$|j|j||||n8|r|jd|zn!|j|j|||}|j||x}	rT|j|||d
dj|S)zMark up some plain text, given a context of symbols to look for.
        Each context dictionary maps object names to anchor names.rzS\b((http|https|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?((?:\w|\.)+))\b"z&quot;z	<a href="z">z</a>z(https://www.rfc-editor.org/rfc/rfc%d.txtz!https://peps.python.org/pep-%04d/r>(zself.<strong>%s</strong>Nr\)escaperrsearchspanrcgroupsreplacernamelinkr)r*textrr$classesrVreherepatternr{startendallschemerfcpepselfdotr/urls                   rmarkupzServerHTMLDoc.markups&4;;**<=~~dD11e1JE3NN6$tE"23438<<>0Cc7DSk))#x8SAB@3s8KVC[IJ9CHDVC[IJc#a%C't}}T7E7KL9D@At}}T7;<D)~~dD11e1*	vd45k*+wwwrc|xr|jxsddz|z}d}	d|j|d|j|d}
t|rtt	|}nd}t|tr|dxs|}|dxsd}ntj|}|
|z|	xr|jd	|	zz}
|j||j|||}|xrd
|z}d|
d|d
S)z;Produce HTML documentation for a function or method object.r\rz	<a name="z
"><strong>z
</strong></a>z(...)rr>z'<font face="helvetica, arial">%s</font>z<dd><tt>%s</tt></dd>z<dl><dt>z</dt>z</dl>
)r1rrrr

isinstancetupler]r^greyr	preformat)r*objectr/modr$rrVclanchornotetitleargspec	docstringdecldocs               r
docroutinezServerHTMLDoc.docroutines$*c1D8
KKT!24F)F+,GGfe$Qi*7Gq	RIV,Iw$#A49984?,ABkkt~~ugw@2,s2-1377rci}|jD]\}}d|z||<||||<|j|}d|z}|j|}|j||j|}	|	xrd|	z}	|d|	zz}g}
t|j}|D](\}}|
j
|j|||*||jdddj|
z}|S)	z1Produce HTML documentation for an XML-RPC server.z#-z)<big><big><strong>%s</strong></big></big>z<tt>%s</tt>z
<p>%s</p>
)r$Methods	functionsr\)
itemsrheadingrr
rUrcr
bigsectionr)r*server_namepackage_documentationrVfdictkeyvalueheadresultrcontentsmethod_itemss            r	docserverzServerHTMLDoc.docservers
!--/	&JCE#J :E%L	&kk+.:[Hd#kk/G)mc)-#--gmmo.&	FJCOODOOE3eODE	F$//{BGGH$577
rc(d}d|z}d|d|d|dS)zFormat an HTML page.rsz1<link rel="stylesheet" type="text/css" href="%s">zI<!DOCTYPE>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Python: z	</title>
z
</head><body>z</body></html>rX)r*rr&css_pathcss_links     rpagezServerHTMLDoc.page"s,?
	',Xx
A	Ar)r1rmrnrorrr(r,rXrrrrs2A"&b"b% N,0R8:4Arrc.eZdZdZdZdZdZdZdZy)XMLRPCDocGeneratorzGenerates documentation for an XML-RPC server.

    This class is designed as mix-in and should not
    be constructed directly.
    c.d|_d|_d|_y)NzXML-RPC Server DocumentationzGThis server exports the following methods through the XML-RPC protocol.)rserver_documentationserver_titler8s rr+zXMLRPCDocGenerator.__init__7s!9
	
!;rc||_y)z8Set the HTML title of the generated server documentationN)r1)r*r1s  rset_server_titlez#XMLRPCDocGenerator.set_server_title?s)rc||_y)z7Set the name of the generated HTML server documentationN)r)r*rs  rset_server_namez"XMLRPCDocGenerator.set_server_nameDs'rc||_y)z3Set the documentation string for the entire server.N)r0)r*r0s  rset_server_documentationz+XMLRPCDocGenerator.set_server_documentationIs%9!rci}|jD]}||jvr|j|}n|jddg}t|jdr|jj	||d<t|jdr|jj||d<t
|}|dk7r|}n8t|jds	t|j|}n
|}nJd|||<t}|j|j|j|}|jtj|j |S#t$r|}YtwxYw)	agenerate_html_documentation() => html documentation for the server

        Generates HTML documentation for the server using introspection for
        installed functions and instances that do not implement the
        _dispatch method. Alternatively, instances can choose to implement
        the _get_method_argstring(method_name) method to provide the
        argument string used in the documentation and the
        _methodHelp(method_name) method to provide the help text used
        in the documentation.N_get_method_argstringrr[r>rlrCzACould not find method in self.functions and no instance installed)r5r$r%rTr9r[rrrrr(rr0r,htmlrr1)r*rVrYrKmethod_info
documenter
documentations       rgenerate_html_documentationz.XMLRPCDocGenerator.generate_html_documentationNsa224	*Kdjj(K0*#Tl4==*AB%)]]%H%H%UKN4==-8%)]]%>%>{%KKN#K0,.(F <-!9$(MM$/"&)F///$*GK 7	*:#_
",, $ 0 0 $ 9 9 '
t{{4+<+<=}MM#*-!,-sEE,+E,N)	r1rmrnror+r3r5r7r>rXrrr.r.0s!;)
'
9
1Nrr.ceZdZdZdZdZy)DocXMLRPCRequestHandlerzXML-RPC and documentation request handler class.

    Handles all HTTP POST requests and attempts to decode them as
    XML-RPC requests.

    Handles all HTTP GET requests and interprets them as requests
    for documentation.
    c,tjjtjjt}tjj|ddd}t
|d5}|jcdddS#1swYyxYw)Nz..
pydoc_dataz
_pydoc.cssrb)mode)rrIdirnamerealpath__file__ropenr)r*r	path_herer*fps     r_get_cssz DocXMLRPCRequestHandler._get_cssseGGOOBGG$4$4X$>?	77<<	4|L
(
&	"779			s0B

Bc|js|jy|jjdrd}|j	|j}n+d}|j
j
jd}|jd|jdd|z|jd	tt||j|jj|y)
}Handles the HTTP GET request.

        Interpret all HTTP GET requests as requests for server
        documentation.
        Nz.cssztext/cssz	text/htmlr#rzContent-Typez%s; charset=UTF-8r)rrrIendswithrKrr>rFrrrrrrr)r*content_typerLs   rdo_GETzDocXMLRPCRequestHandler.do_GETs%%'OO99f%%L}}TYY/H&L{{>>@GGPH3)<|)KL)3s8}+=>

"rN)r1rmrnrorKrPrXrrr@r@s#rr@c$eZdZdZedddddfdZy)DocXMLRPCServerzXML-RPC and HTML documentation server.

    Adds the ability to serve server documentation to the capabilities
    of SimpleXMLRPCServer.
    TFNc
ftj||||||||tj|yr)rr+r.rs        rr+zDocXMLRPCServer.__init__s5	##D$$.:K$5	7	##D)r)r1rmrnror@r+rXrrrRrRs-D!ed#'5*rrRceZdZdZdZdZy)DocCGIXMLRPCRequestHandlerzJHandler for XML-RPC data and documentation requests passed through
    CGIcx|jjd}tdtdt|zttj
j
tj
jj|tj
jj
y)rMr#zContent-Type: text/htmlrN)	r>rFrrrrrrrrs  rrz%DocCGIXMLRPCRequestHandler.handle_gets{335<<WE
'(
"S]23




)

!rcXtj|tj|yr)rr+r.r8s rr+z#DocCGIXMLRPCRequestHandler.__init__s((.##D)rN)r1rmrnrorr+rXrrrUrUs" *rrU__main__c&eZdZdZGddZy)ExampleServicecy)N42rXr8s rgetDatazExampleService.getDatasrceZdZedZy)ExampleService.currentTimec>tjjSr)datetimenowrXrrgetCurrentTimez)ExampleService.currentTime.getCurrentTimes((,,..rN)r1rmrnstaticmethodrcrXrrcurrentTimer_s

/
/rreN)r1rmrnr]rerXrrrZrZs		/	/rrZ)	localhosti@c||zSrrX)xys  r<lambda>rjs
QqSradd)rz&Serving XML-RPC on localhost port 8000zKIt is advisable to run this example server within a secure, closed network.z&
Keyboard interrupt received, exiting.)T)1ro
xmlrpc.clientrrrrrhttp.serverr	functoolsr	inspectr
r:rrrrrr]rfcntlImportErrorrrr rqrrrrHTMLDocrr.r@rRrUr1rarZrr0powr-r<r
serve_foreverKeyboardInterruptexitrXrr<module>rwseTHG.
		04IAIAVPA!7PAdW///W8%.%N?-4?-JmAEMMmA^ONONb&#8&#P**** *$;$6*4z//
/	0F  %  %8  !1d K++-
67
[\	  "uE^!	;<CHHQK	s=E%-AFE3%E0/E03FFFFF!