KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/DocXMLRPCServer.pyo
mς
‚=5Dc@s8dZdkZdkZdkZdkZdkZdklZlZlZl	Z	dei
fd„ƒYZdfd„ƒYZdefd„ƒYZ
d	eefd
„ƒYZdeefd„ƒYZed
joad„ZedƒZeidƒeidƒeidƒeieƒeiƒeiƒndS(sKSelf documenting XML-RPC Server.

This module 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.

This module is built upon the pydoc and SimpleXMLRPCServer
modules.
N(sSimpleXMLRPCServersSimpleXMLRPCRequestHandlersCGIXMLRPCRequestHandlersresolve_dotted_attributet
ServerHTMLDoccBsGtZdZehhhd„Zeehhhed„Zd„ZRS(s7Class used to generate pydoc HTML document for a servercCsί|p|i}g}d}tidƒ}x|i||ƒ}|pPn|i
ƒ\}}|i
||||!ƒƒ|iƒ\}}}
}
}}|o3||ƒiddƒ}	|i
d|	|	fƒnα|
o1dt|
ƒ}	|i
d|	||ƒfƒn©|
o1dt|
ƒ}	|i
d|	||ƒfƒnq|||d!d	jo#|i
|i||||ƒƒn6|o|i
d
|ƒn|i
|i||ƒƒ|}q.W|i
|||ƒƒdi|ƒS(
sƒMark up some plain text, given a context of symbols to look for.
        Each context dictionary maps object names to anchor names.isM\b((http|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?((?:\w|\.)+))\bit"s&quot;s<a href="%s">%s</a>s'http://www.rfc-editor.org/rfc/rfc%d.txts(http://www.python.org/peps/pep-%04d.htmlt(sself.<strong>%s</strong>tN(tescapetselftresultstheretretcompiletpatterntsearchttexttmatchtspantstarttendtappendtgroupstalltschemetrfctpeptselfdottnametreplaceturltinttnamelinktmethodstfuncstclassestjoin(RRRRRRRRRRRRRRR
RRR
R((t'/usr/lib64/python2.4/DocXMLRPCServer.pytmarkups<!!#cCs‰|o
|ipdd|}d}
d||f}	ti|ƒoGti	|i
ƒ\}}}}ti|d|||d|iƒ}nWti|ƒo@ti	|ƒ\}}}}ti||||d|iƒ}nd}t|tiƒo&|dp|}|dpd}
nti|ƒ}
|	||
o|id|
ƒ}|i|
|i|||ƒ}|od	|}d
||fS(s;Produce HTML documentation for a function or method object.Rt-s$<a name="%s"><strong>%s</strong></a>itformatvalues(...)is'<font face="helvetica, arial">%s</font>s<dd><tt>%s</tt></dd>s<dl><dt>%s</dt>%s</dl>
N("tclt__name__Rtanchortnotettitletinspecttismethodtobjectt
getargspectim_functargstvarargstvarkwtdefaultst
formatargspecRR$targspect
isfunctiont
isinstancettypest	TupleTypet	docstringtpydoctgetdoctgreytdeclR"t	preformatRRRtdoc(RR,RtmodRRRR%R=R)R(R1R/R9R0R?R4R2R'((R!t
docroutineDs.
%"cCsh}
x6|iƒD](\}	}d|	|
|	<|
|	|
|<qWd|}|i|ddƒ}|i
||i|
ƒ}|od|}|d|}g}|iƒ}|iƒx3|D]+\}	}|i|i||	d|
ƒƒqΈW||iddd	ti|ƒƒ}|S(s1Produce HTML documentation for an XML-RPC server.s#-s)<big><big><strong>%s</strong></big></big>s#ffffffs#7799ees<tt>%s</tt>s
<p>%s</p>
RtMethodss#eeaa77N(tfdictRtitemstkeytvaluetserver_nametheadRtheadingtresultR"tpackage_documentationR>R?tcontentstmethod_itemstsortRRAt
bigsectionR:R (RRGRKRRHR?RFRMRJRERCRL((R!t	docserverms&


#%(R&t
__module__t__doc__tNoneR"RARP(((R!Rs))tXMLRPCDocGeneratorcBs;tZdZd„Zd„Zd„Zd„Zd„ZRS(s…Generates documentation for an XML-RPC server.

    This class is designed as mix-in and should not
    be constructed directly.
    cCsd|_d|_d|_dS(NsXML-RPC Server DocumentationsGThis server exports the following methods through the XML-RPC protocol.(RRGtserver_documentationtserver_title(R((R!t__init__s		cCs
||_dS(s8Set the HTML title of the generated server documentationN(RVR(RRV((R!tset_server_title•scCs
||_dS(s7Set the name of the generated HTML server documentationN(RGR(RRG((R!tset_server_namešscCs
||_dS(s3Set the documentation string for the entire server.N(RUR(RRU((R!tset_server_documentationŸscCsnh}x.|iƒD] }|ii|ƒo|i|}nν|idj	oάddg}t
|idƒo|ii|ƒ|d<nt
|idƒo|ii|ƒ|d<nt
|ƒ}|djo
|}q)t
|idƒp6yt|i|ƒ}Wq%tj
o
|}q%Xq)|}n|||<qWtƒ}|i|i|i|ƒ}|i|i|ƒS(sgenerate_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.t_get_method_argstringit_methodHelpit	_dispatchN(NN(RRtsystem_listMethodstmethod_nameRthas_keytmethodtinstanceRStmethod_infothasattrR[R\ttupletresolve_dotted_attributetAttributeErrorRt
documenterRPRGRUt
documentationtpageRV(RRRiRhRaR_Rc((R!tgenerate_html_documentation€s:	


	

		(R&RQRRRWRXRYRZRk(((R!RT†s				tDocXMLRPCRequestHandlercBstZdZd„ZRS(sθXML-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.
    cCsƒ|iiƒ}|idƒ|iddƒ|idtt|ƒƒƒ|iƒ|i	i
|ƒ|i	iƒ|ii
dƒdS(s}Handles the HTTP GET request.

        Interpret all HTTP GET requests as requests for server
        documentation.
        iΘsContent-types	text/htmlsContent-lengthiN(RtserverRktresponset
send_responsetsend_headertstrtlentend_headerstwfiletwritetflusht
connectiontshutdown(RRn((R!tdo_GETαs


(R&RQRRRy(((R!RlΧstDocXMLRPCServercBstZdZedd„ZRS(sŽXML-RPC and HTML documentation server.

    Adds the ability to serve server documentation to the capabilities
    of SimpleXMLRPCServer.
    icCs'ti||||ƒti|ƒdS(N(tSimpleXMLRPCServerRWRtaddrtrequestHandlertlogRequestsRT(RR|R}R~((R!RWϋs(R&RQRRRlRW(((R!RzσstDocCGIXMLRPCRequestHandlercBs tZdZd„Zd„ZRS(sJHandler for XML-RPC data and documentation requests passed through
    CGIcCs5|iƒ}dGHdt|ƒGHHtii|ƒdS(s}Handles the HTTP GET request.

        Interpret all HTTP GET requests as requests for server
        documentation.
        sContent-Type: text/htmlsContent-Length: %dN(RRkRnRrtsyststdoutRu(RRn((R!t
handle_getscCsti|ƒti|ƒdS(N(tCGIXMLRPCRequestHandlerRWRRT(R((R!RWs
(R&RQRRR‚RW(((R!Rs	t__main__cCsdk}||idS(sadeg_to_rad(90) => 1.5707963267948966

        Converts an angle in degrees to an angle in radiansNi΄(tmathtdegtpi(R†R…((R!t
deg_to_rads	t	localhosti@sMath ServersMath XML-RPC ServersΪThis server supports various mathematical functions.

You can use it from Python as follows:

>>> from xmlrpclib import ServerProxy
>>> s = ServerProxy("http://localhost:8000")
>>> s.deg_to_rad(90.0)
1.5707963267948966(R‰i@(RRR:R*R7RR€R{tSimpleXMLRPCRequestHandlerRƒRftHTMLDocRRTRlRzRR&RˆRmRXRYRZtregister_functiont register_introspection_functionst
serve_forever(RlR€RTRRŠRR*R{RƒR:RRfRmRzRˆR7((R!t?s(					nQ

	


	



Anon7 - 2021