AlkantarClanX12

Your IP : 3.135.193.193


Current Path : /proc/self/root/opt/alt/python311/lib64/python3.11/xmlrpc/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python311/lib64/python3.11/xmlrpc/__pycache__/server.cpython-311.opt-2.pyc

�

c��f�����	ddlmZmZmZmZmZddlmZddlm	Z	ddl
mZddlZddlZ
ddlZddlZddlZddlZddlZddlZ	ddlZn
#e$rdZYnwxYwd'd�Zd�ZGd	�d
��ZGd�de��ZGd
�deje��ZGd�de��ZGd�de��ZGd�dej��ZGd�d��Z Gd�de��Z!Gd�dee ��Z"Gd�dee ��Z#e$dkr�ddl%Z%Gd�d��Z&ed ��5Z'e'�(e)��e'�(d!�d"��e'�*e&��d�#��e'�+��e,d$��e,d%��	e'�-��n&#e.$re,d&��ej/d��YnwxYwddd��dS#1swxYwYdSdS)(�)�Fault�dumps�loads�gzip_encode�gzip_decode)�BaseHTTPRequestHandler)�partial)�	signatureNTc��	|r|�d��}n|g}|D]9}|�d��rtd|z���t||��}�:|S)N�.�_z(attempt to access private attribute "%s")�split�
startswith�AttributeError�getattr)�obj�attr�allow_dotted_names�attrs�is     �4/opt/alt/python311/lib64/python3.11/xmlrpc/server.py�resolve_dotted_attributer|s|������
�
�3��������
�!�!���<�<����	!� �:�Q�>���
��#�a�.�.�C�C��J�c�<��	�fd�t���D��S)Nc�x��g|]6}|�d���tt�|�����4|��7S)r
)r�callabler)�.0�memberrs  �r�
<listcomp>z'list_public_methods.<locals>.<listcomp>�sU���4�4�4�v��(�(��-�-�4��W�S�&�1�1�2�2�4�F�4�4�4r)�dir)rs`r�list_public_methodsr!�s8���3�4�4�4�4��S���4�4�4�4rc�^�eZdZ			dd�Zdd�Zdd�Zd�Zd�Zdd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
dS)�SimpleXMLRPCDispatcherFNc�P�i|_d|_||_|pd|_||_dS�N�utf-8)�funcs�instance�
allow_none�encoding�use_builtin_types��selfr)r*r+s    r�__init__zSimpleXMLRPCDispatcher.__init__�s1����
���
�$��� �+�G��
�!2����rc�$�	||_||_dS�N)r(r)r-r(rs   r�register_instancez(SimpleXMLRPCDispatcher.register_instance�s��	�@!��
�"4����rc�^�	|�t|j|���S|�|j}||j|<|S)N)�name)r	�register_function�__name__r')r-�functionr3s   rr4z(SimpleXMLRPCDispatcher.register_function�sC��	����4�1��=�=�=�=��<��$�D�#��
�4���rc�b�	|j�|j|j|jd���dS)N)zsystem.listMethodszsystem.methodSignaturezsystem.methodHelp)r'�update�system_listMethods�system_methodSignature�system_methodHelp�r-s r� register_introspection_functionsz7SimpleXMLRPCDispatcher.register_introspection_functions�sO��	�	
�
���$�2I�15�1L�,0�,B�D�D�	E�	E�	E�	E�	Erc�J�	|j�d|ji��dS)Nzsystem.multicall)r'r8�system_multicallr<s r�register_multicall_functionsz3SimpleXMLRPCDispatcher.register_multicall_functions�s.��	<�
	
�
���-��0E�F�G�G�G�G�Grc	��		t||j���\}}|�
|||��}n|�||��}|f}t|d|j|j���}n�#t$r&}t||j|j���}Yd}~nVd}~wt$rF}tt
dt|���d|����|j|j���}Yd}~nd}~wwxYw|�	|jd��S)N)r+�)�methodresponser)r*)r)r*�:�r*r)�xmlcharrefreplace)
rr+�	_dispatchrr)r*r�
BaseException�type�encode)	r-�data�dispatch_method�path�params�method�response�fault�excs	         r�_marshaled_dispatchz*SimpleXMLRPCDispatcher._marshaled_dispatch�s<��		�	�"�4�4�;Q�R�R�R�N�F�F��*�*�?�6�6�:�:����>�>�&�&�9�9�� �{�H��X�a�(,��$�-�Q�Q�Q�H�H���	5�	5�	5��U�t��&*�m�5�5�5�H�H�H�H�H�H������	�	�	���a�D��I�I�I�I�s�s�3�4�4���4�?����H�H�H�H�H�H�����	�������t�}�.A�B�B�Bs$�AA"�"
C �,B
�

C �<C�C c�l�	t|j�����}|j�xt	|jd��r*|t|j�����z}n9t	|jd��s$|tt
|j����z}t|��S)N�_listMethodsrG)�setr'�keysr(�hasattrrUr!�sorted)r-�methodss  rr9z)SimpleXMLRPCDispatcher.system_listMethodss���	B��d�j�o�o�'�'�(�(���=�$��t�}�n�5�5�
C��3�t�}�9�9�;�;�<�<�<����T�]�K�8�8�
C��3�2�4�=�A�A�B�B�B���g���rc��	dS)Nzsignatures not supported�)r-�method_names  rr:z-SimpleXMLRPCDispatcher.system_methodSignature)s��	@�*�)rc�V�	d}||jvr|j|}nx|j�qt|jd��r|j�|��St|jd��s-	t	|j||j��}n#t$rYnwxYw|�dStj|��S)N�_methodHelprG�)	r'r(rXr_rrr�pydoc�getdoc)r-r]rOs   rr;z(SimpleXMLRPCDispatcher.system_methodHelp6s���	O����$�*�$�$��Z��,�F�F�
�]�
&��t�}�m�4�4�
��}�0�0��=�=�=��T�]�K�8�8�
��5� $�
� +� $� 7�"�"�F�F��
&�����D�����
�>��2��<��'�'�'s�'B�
B�Bc�v�	g}|D]�}|d}|d}	|�|�||��g���>#t$r,}|�|j|jd���Yd}~�od}~wt
$r4}|�dt
|���d|��d���Yd}~��d}~wwxYw|S)N�
methodNamerN)�	faultCode�faultStringrBrD)�appendrGrrerfrHrI)r-�	call_list�results�callr]rNrQrRs        rr?z'SimpleXMLRPCDispatcher.system_multicallUs1��	����	�	�D��|�,�K��(�^�F�

�������{�F� C� C�D�E�E�E�E���
�
�
����#(�?�%*�%6�8�8�������������!�
�
�
����#$�04�S�	�	�	�	�3�3�%?�A�A�������������
����
�s#�*A�
B6�"A5�5
B6�*B1�1B6c�l�		|j|}|�||�Std|z���#t$rYnwxYw|j�dt	|jd��r|j�||��S	t
|j||j��}|�||�Sn#t$rYnwxYwtd|z���)Nzmethod "%s" is not supportedrG)	r'�	Exception�KeyErrorr(rXrGrrr)r-rOrN�funcs    rrGz SimpleXMLRPCDispatcher._dispatchts��	�(	E��:�f�%�D����t�V�}�$��:�V�C�D�D�D���	�	�	��D�	�����=�$��t�}�k�2�2�
?��}�.�.�v�v�>�>�>�

)�/��M���+�����#��4��=�(�$��"�
�
�
���
�����6��?�@�@�@s�
)�
6�6�1B�
B!� B!�FNF)F�NN)r5�
__module__�__qualname__r.r1r4r=r@rSr9r:r;r?rGr\rrr#r#�s��������37�#(�3�3�3�3�"5�"5�"5�"5�H���� 	E�	E�	E�H�H�H�!C�!C�!C�!C�F���$*�*�*�(�(�(�>���>1A�1A�1A�1A�1Arr#c��eZdZ	dZdZdZdZejdej	ej
z��Zd�Zd�Z
d�Zd	�Zd
�Zdd�Zd
S)�SimpleXMLRPCRequestHandler)�/z/RPC2�
/pydoc.cssix���Tz�
                            \s* ([^\s;]+) \s*            #content-coding
                            (;\s* q \s*=\s* ([0-9\.]+))? #q
                            c�(�i}|j�dd��}|�d��D]^}|j�|��}|r@|�d��}|rt
|��nd}|||�d��<�_|S)NzAccept-Encodingr`�,�g�?rB)�headers�getr�	aepattern�match�group�float)r-�r�ae�er~�vs      r�accept_encodingsz+SimpleXMLRPCRequestHandler.accept_encodings�s�����
�\�
�
�/��
4�
4�����#���	&�	&�A��N�(�(��+�+�E��
&��K�K��N�N�� !�*�E�!�H�H�H�s��$%��%�+�+�a�.�.�!���rc�0�|jr|j|jvSdS)NT)�	rpc_pathsrMr<s r�is_rpc_path_validz,SimpleXMLRPCRequestHandler.is_rpc_path_valid�s"���>�	��9���.�.��4rc���	|���s|���dS	d}t|jd��}g}|r\t	||��}|j�|��}|sn/|�|��|t|d��z}|�\d�	|��}|�
|��}|�dS|j�|t|dd��|j��}|�d��|�dd��|j�yt|��|jkra|����d	d
��}|r7	t)|��}|�dd	��n#t*$rYnwxYw|�dt-t|������|���|j�|��dS#t4$r�}	|�d
��t7|jd��r||jjrp|�dt-|	����t;j��}
t-|
�dd��d��}
|�d|
��|�dd��|���Yd}	~	dSd}	~	wwxYw)Ni�zcontent-lengthrwrrG���Content-typeztext/xml�gziprzContent-Encoding�Content-lengthi��_send_traceback_headerzX-exception�ASCII�backslashreplacezX-traceback�0) r��
report_404�intr{�min�rfile�readrg�len�join�decode_request_content�serverrSrrM�
send_response�send_header�encode_thresholdr�r|r�NotImplementedError�str�end_headers�wfile�writerlrXr��	traceback�
format_excrJ)r-�max_chunk_size�size_remaining�L�
chunk_size�chunkrKrP�qr��traces           r�do_POSTz"SimpleXMLRPCRequestHandler.do_POST�s��	��%�%�'�'�	��O�O�����F�9	'�
*�N� ���.>�!?�@�@�N��A� �
-� ���@�@�
��
���
�3�3�������������#�a��e�*�*�,��
!�
-��8�8�A�;�;�D��.�.�t�4�4�D��|����{�6�6��'�$��T�:�:�D�I���H�$
���s�#�#�#����^�Z�8�8�8��$�0��x�=�=�4�#8�8�8��-�-�/�/�3�3�F�A�>�>�A��!�!�'2�8�'<�'<�H� �,�,�-?��H�H�H�H��2�!�!�!� �D�!�������-�s�3�x�=�=�/A�/A�B�B�B��������J���X�&�&�&�&�&��9�
	�
	�
	����s�#�#�#��t�{�$<�=�=�
7��K�6�
7�� � ���A���7�7�7�!�,�.�.���E�L�L��2D�E�E�w�O�O��� � ���6�6�6����-�s�3�3�3�����������������
	���s1�B(H�0H�<%F"�"
F/�.F/�
K7�CK2�2K7c��|j�dd�����}|dkr|S|dkrZ	t|��S#t$r|�dd|z��Yn>t$r|�dd��YnwxYw|�dd|z��|�dd	��|���dS)
Nzcontent-encoding�identityr�i�zencoding %r not supported�zerror decoding gzip contentr�r�)	r{r|�lowerrr�r��
ValueErrorr�r�)r-rKr*s   rr�z1SimpleXMLRPCRequestHandler.decode_request_contents���<�#�#�$6�
�C�C�I�I�K�K���z�!�!��K��v���
G�"�4�(�(�(��&�
P�
P�
P��"�"�3�(C�h�(N�O�O�O�O�O��
G�
G�
G��"�"�3�(E�F�F�F�F�F�
G����
���s�$?�(�$J�K�K�K����)�3�/�/�/��������s�A�#B�1B�Bc��|�d��d}|�dd��|�dtt|������|���|j�|��dS)Ni�sNo such pager�z
text/plainr�)r�r�r�r�r�r�r��r-rPs  rr�z%SimpleXMLRPCRequestHandler.report_404*s������3����"�������6�6�6����)�3�s�8�}�}�+=�+=�>�>�>��������
����"�"�"�"�"r�-c�P�	|jjrtj|||��dSdSr0)r��logRequestsr�log_request)r-�code�sizes   rr�z&SimpleXMLRPCRequestHandler.log_request3s:��2��;�"�	A�"�.�t�T�4�@�@�@�@�@�	A�	ArN)r�r�)r5rqrrr�r��wbufsize�disable_nagle_algorithm�re�compile�VERBOSE�
IGNORECASEr}r�r�r�r�r�r�r\rrrtrt�s��������-�I����H�"����
� �"$��b�m�!;�=�=�I�
	�	�	����E'�E'�E'�N���"#�#�#�A�A�A�A�A�Arrtc�,�eZdZ	dZdZedddddfd�ZdS)�SimpleXMLRPCServerTFNc��||_t�||||��tj�||||��dSr0)r�r#r.�socketserver�	TCPServer�r-�addr�requestHandlerr�r)r*�bind_and_activater+s        rr.zSimpleXMLRPCServer.__init__LsK��'����'�'��j�(�DU�V�V�V���'�'��d�N�DU�V�V�V�V�Vr)r5rqrr�allow_reuse_addressr�rtr.r\rrr�r�9sR���������#��,F�!�e�d�#'�5�W�W�W�W�W�Wrr�c�8�eZdZ	edddddfd�Zd�Zd�Zdd�ZdS)	�MultiPathXMLRPCServerTFNc
�v�t�||||||||��i|_||_|pd|_dSr%)r�r.�dispatchersr)r*r�s        rr.zMultiPathXMLRPCServer.__init__]sQ��	�#�#�D�$���Z�$,�.?�AR�	T�	T�	T����$��� �+�G��
�
�
rc��||j|<|Sr0�r�)r-rM�
dispatchers   r�add_dispatcherz$MultiPathXMLRPCServer.add_dispatchergs��!+������rc��|j|Sr0r�)r-rMs  r�get_dispatcherz$MultiPathXMLRPCServer.get_dispatcherks�����%�%rc	�*�	|j|�|||��}nn#t$ra}tt	dt|���d|����|j|j���}|�|jd��}Yd}~nd}~wwxYw|S)NrBrDrErF)	r�rSrHrrrIr*r)rJ)r-rKrLrMrPrRs      rrSz)MultiPathXMLRPCServer._marshaled_dispatchns���
	K��'��-�A�A��_�d�,�,�H�H���	K�	K�	K���a�D��I�I�I�I�s�s�3�4�4���4�?�D�D�D�H� ���t�}�6I�J�J�H�H�H�H�H�H�����	K�����s�"%�
B�AB�Brp)r5rqrrrtr.r�r�rSr\rrr�r�Usq�������-G�!�e�d�#'�5�,�,�,�,����&�&�&������rr�c�,�eZdZ	dd�Zd�Zd�Zdd�ZdS)	�CGIXMLRPCRequestHandlerFNc�@�t�||||��dSr0)r#r.r,s    rr.z CGIXMLRPCRequestHandler.__init__s#���'�'��j�(�DU�V�V�V�V�Vrc�t�	|�|��}td��tdt|��z��t��tj���tjj�|��tjj���dS)NzContent-Type: text/xml�Content-Length: %d)rS�printr��sys�stdout�flush�bufferr�)r-�request_textrPs   r�
handle_xmlrpcz%CGIXMLRPCRequestHandler.handle_xmlrpc�s���-��+�+�L�9�9��
�&�'�'�'�
�"�S��]�]�2�3�3�3�
�����
�������
�����)�)�)��
����!�!�!�!�!rc��	d}tj|\}}tjj|||d�z}|�d��}t
d||fz��t
dtjjz��t
dt|��z��t
��tj
���tj
j�
|��tj
j���dS)Nr�)r��message�explainr&z
Status: %d %szContent-Type: %sr�)r�	responses�httpr��DEFAULT_ERROR_MESSAGErJr��DEFAULT_ERROR_CONTENT_TYPEr�r�r�r�r�r�)r-r�r�r�rPs     r�
handle_getz"CGIXMLRPCRequestHandler.handle_get�s���	���1�;�D�A�����;�4�� � �
�
����?�?�7�+�+��
�o��w��/�0�0�0�
� �4�;�#I�I�J�J�J�
�"�S��]�]�2�3�3�3�
�����
�������
�����)�)�)��
����!�!�!�!�!rc�|�	|�:tj�dd��dkr|���dS	t	tj�dd����}n#t
tf$rd}YnwxYw|�tj�	|��}|�
|��dS)N�REQUEST_METHOD�GET�CONTENT_LENGTHrw)�os�environr|r�r�r��	TypeErrorr��stdinr�r�)r-r��lengths   r�handle_requestz&CGIXMLRPCRequestHandler.handle_request�s���	����J�N�N�+�T�2�2�e�;�;��O�O������
��R�Z�^�^�,<�d�C�C�D�D�����	�*�
�
�
�����
�����#�"�y�~�~�f�5�5�����|�,�,�,�,�,s�-A-�-B�Bror0)r5rqrrr.r�r�r�r\rrr�r�|sa������=�W�W�W�W�
"�
"�
"�"�"�"�2-�-�-�-�-�-rr�c�>�eZdZ	diiifd�Zdiiidfd�Zd�Zd�ZdS)�
ServerHTMLDocNc��	|p|j}g}d}tjd��}	|�||��}	|	s�n�|	���\}
}|�||||
�����|	���\}}
}}}}|
r<||���dd��}|�d|�d|�d���n�|r8d	t|��z}|�d|�d||���d���n�|r8d
t|��z}|�d|�d||���d���n�|||dz�dkr,|�|�	||||����nD|r|�d|z��n)|�|�	||����|}���|�|||d�����d
�
|��S)NrzS\b((http|https|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?((?:\w|\.)+))\brB�"z&quot;z	<a href="z">z</a>z(https://www.rfc-editor.org/rfc/rfc%d.txtz!https://peps.python.org/pep-%04d/�(zself.<strong>%s</strong>r`)�escaper�r��search�spanrg�groups�replacer��namelinkr�)r-�textr�r'�classesrZri�here�patternr~�start�end�all�scheme�rfc�pep�selfdotr3�urls                   r�markupzServerHTMLDoc.markup�s:��	F��&�4�;�������*�<�=�=��	��N�N�4��.�.�E���%������J�E�3��N�N�6�6�$�t�E�z�"2�3�3�4�4�4�38�<�<�>�>�0�C���c�7�D��
=��f�S�k�k�)�)�#�x�8�8���������S�S�S�A�B�B�B�B��
=�@�3�s�8�8�K���������V�V�C�[�[�[�[�I�J�J�J�J��
=�9�C��H�H�D���������V�V�C�[�[�[�[�I�J�J�J�J��c�#�a�%�i��C�'�'����t�}�}�T�7�E�7�K�K�L�L�L�L��
=����9�D�@�A�A�A�A����t�}�}�T�7�;�;�<�<�<��D�-	�.	���v�v�d�4�5�5�k�*�*�+�+�+��w�w�w���rc��	|r|jpddz|z}d}	d|�|���d|�|���d�}
t|��rtt	|����}nd}t|t��r|dp|}|dpd}ntj|��}|
|z|	o|�	d	|	z��z}
|�
||j|||��}|od
|z}d|
�d|�d
�S)Nr`r�z	<a name="z
"><strong>z
</strong></a>z(...)rrBz'<font face="helvetica, arial">%s</font>z<dd><tt>%s</tt></dd>z<dl><dt>z</dt>z</dl>
)r5r�rr�r
�
isinstance�tuplerarb�greyr
�	preformat)r-�objectr3�modr'r�rZ�cl�anchor�note�title�argspec�	docstring�decl�docs               r�
docroutinezServerHTMLDoc.docroutine�s?��I��$���*��c�1�D�8�����
�K�K���������T�!2�!2�!2�!2�4���F���	��)�F�+�+�,�,�G�G��G��f�e�$�$�	-��Q�i�*�7�G��q�	��R�I�I���V�,�,�I��w��$�#A�4�9�9�8�4�?�,A�,A�B���k�k��t�~�u�g�w�@�@���2�,�s�2���-1�T�T�3�3�3�7�7rc� �	i}|���D]\}}d|z||<||||<�|�|��}d|z}|�|��}|�||j|��}	|	od|	z}	|d|	zz}g}
t|�����}|D]0\}}|
�|�|||������1||�ddd�	|
����z}|S)	Nz#-z)<big><big><strong>%s</strong></big></big>z<tt>%s</tt>z
<p>%s</p>
)r'�Methods�	functionsr`)
�itemsr��headingr
rrYrgr�
bigsectionr�)r-�server_name�package_documentationrZ�fdict�key�value�head�resultr�contents�method_itemss            r�	docserverzServerHTMLDoc.docserver
s-��?���!�-�-�/�/�	&�	&�J�C�����E�#�J� ��:�E�%�L�L��k�k�+�.�.��:�[�H�����d�#�#���k�k�/����G�G���)�m�c�)���-�#�-�-�����g�m�m�o�o�.�.��&�	F�	F�J�C���O�O�D�O�O�E�3�e�O�D�D�E�E�E�E��$�/�/��{�B�G�G�H�$5�$5�7�7�7���
rc�*�	d}d|z}d|�d|�d|�d�S)Nrvz1<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>r\)r-rr(�css_path�css_links     r�pagezServerHTMLDoc.page$s=��"���?��
�	��',�e�e�X�X�X�x�x�x�
A�	Ar)r5rqrrr
rr*r.r\rrr�r��sz������A�"&�b�"�b�' �' �' �' �R,0��R���8�8�8�8�:���4A�A�A�A�Arr�c�.�eZdZ	d�Zd�Zd�Zd�Zd�ZdS)�XMLRPCDocGeneratorc�0�d|_d|_d|_dS)NzXML-RPC Server DocumentationzGThis server exports the following methods through the XML-RPC protocol.)r!�server_documentation�server_titler<s rr.zXMLRPCDocGenerator.__init__9s'��9���
�	
�!�;����rc��	||_dSr0)r3)r-r3s  r�set_server_titlez#XMLRPCDocGenerator.set_server_titleAs��F�(����rc��	||_dSr0)r!)r-r!s  r�set_server_namez"XMLRPCDocGenerator.set_server_nameFs��E�&����rc��	||_dSr0)r2)r-r2s  r�set_server_documentationz+XMLRPCDocGenerator.set_server_documentationKs��A�$8��!�!�!rc��	i}|���D]�}||jvr|j|}n�|j��ddg}t|jd��r|j�|��|d<t|jd��r|j�|��|d<t
|��}|dkr|}nAt|jd��s)	t|j|��}n#t$r|}YnwxYw|}	|||<��t��}|�
|j|j|��}|�
tj|j��|��S)N�_get_method_argstringrr_rBrprG)r9r'r(rXr;r_r
rrr�r*r!r2r.�htmlr�r3)r-rZr]rO�method_info�
documenter�
documentations       r�generate_html_documentationz.XMLRPCDocGenerator.generate_html_documentationPs���	!����2�2�4�4�	*�	*�K��d�j�(�(���K�0�����*�#�T�l���4�=�*A�B�B�V�%)�]�%H�%H��%U�%U�K��N��4�=�-�8�8�L�%)�]�%>�%>�{�%K�%K�K��N�#�K�0�0���,�.�.�(�F�F� ����<�<�	)�-�!9�$(�M�$/�"&�"&����*�-�-�-�!,����-����)�F�F�
$*�G�K� � �"�_�_�
�"�,�,� $� 0� $� 9� '���
����t�{�4�+<�=�=�}�M�M�Ms�C$�$C3�2C3N)r5rqrrr.r5r7r9r@r\rrr0r02si�������;�;�;�)�)�)�
'�'�'�
9�9�9�
1N�1N�1N�1N�1Nrr0c��eZdZ	d�Zd�ZdS)�DocXMLRPCRequestHandlerc�F�tj�tj�t����}tj�|ddd��}t
|d���5}|���cddd��S#1swxYwYdS)Nz..�
pydoc_dataz
_pydoc.css�rb)�mode)r�rM�dirname�realpath�__file__r��openr�)r-r	�	path_herer,�fps     r�_get_cssz DocXMLRPCRequestHandler._get_css�s����G�O�O�B�G�$4�$4�X�$>�$>�?�?�	��7�<�<�	�4��|�L�L��
�(��
&�
&�
&�	�"��7�7�9�9�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�5B�B�Bc�>�	|���s|���dS|j�d��rd}|�|j��}n.d}|j����d��}|�d��|�	dd|z��|�	dtt|������|���|j
�|��dS)	Nz.cssztext/cssz	text/htmlr&r�zContent-Typez%s; charset=UTF-8r�)r�r�rM�endswithrMr�r@rJr�r�r�r�r�r�r�)r-�content_typerPs   r�do_GETzDocXMLRPCRequestHandler.do_GET�s��	��%�%�'�'�	��O�O�����F��9���f�%�%�	Q�%�L��}�}�T�Y�/�/�H�H�&�L��{�>�>�@�@�G�G��P�P�H����3��������)<�|�)K�L�L�L����)�3�s�8�}�}�+=�+=�>�>�>��������
����"�"�"�"�"rN)r5rqrrrMrQr\rrrBrB�s7����������#�#�#�#�#rrBc�$�eZdZ	edddddfd�ZdS)�DocXMLRPCServerTFNc
�|�t�||||||||��t�|��dSr0)r�r.r0r�s        rr.zDocXMLRPCServer.__init__�sK��	�#�#�D�$���$.��:K�$5�	7�	7�	7�	�#�#�D�)�)�)�)�)r)r5rqrrrBr.r\rrrSrS�s?�������-D�!�e�d�#'�5�*�*�*�*�*�*rrSc��eZdZ	d�Zd�ZdS)�DocCGIXMLRPCRequestHandlerc��	|����d��}td��tdt|��z��t��tj���tjj�|��tjj���dS)Nr&zContent-Type: text/htmlr�)	r@rJr�r�r�r�r�r�r�r�s  rr�z%DocCGIXMLRPCRequestHandler.handle_get�s���	��3�3�5�5�<�<�W�E�E��
�'�(�(�(�
�"�S��]�]�2�3�3�3�
�����
�������
�����)�)�)��
����!�!�!�!�!rc�n�t�|��t�|��dSr0)r�r.r0r<s rr.z#DocCGIXMLRPCRequestHandler.__init__�s0���(�(��.�.�.��#�#�D�)�)�)�)�)rN)r5rqrrr�r.r\rrrVrV�s7�������"�"�"� *�*�*�*�*rrV�__main__c�.�eZdZd�ZGd�d��ZdS)�ExampleServicec��dS)N�42r\r<s r�getDatazExampleService.getData�s���4rc�$�eZdZed���ZdS)�ExampleService.currentTimec�>�tj���Sr0)�datetime�nowr\rr�getCurrentTimez)ExampleService.currentTime.getCurrentTime�s���(�,�,�.�.�.rN)r5rqrr�staticmethodrdr\rr�currentTimer`�s-������
�
/�
/��\�
/�
/�
/rrfN)r5rqrrr^rfr\rrr[r[�sK������	�	�	�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/rr[)�	localhosti@c��||zSr0r\)�x�ys  r�<lambda>rk�s
��Q�q�S�r�add)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)0�
xmlrpc.clientrrrrr�http.serverr�	functoolsr	�inspectr
r<r�r�r�r�r�rar��fcntl�ImportErrorrr!r#rtr�r�r�r��HTMLDocr�r0rBrSrVr5rbr[r�r4�powr1r@r��
serve_forever�KeyboardInterrupt�exitr\rr�<module>rxs���e�TH�G�G�G�G�G�G�G�G�G�G�G�G�G�.�.�.�.�.�.�������������������������
�
�
�
�	�	�	�	�	�	�	�	�����������L�L�L�L�������E�E�E���������04�4�4�IA�IA�IA�IA�IA�IA�IA�IA�VPA�PA�PA�PA�PA�!7�PA�PA�PA�dW�W�W�W�W��/�/�W�W�W�8%�%�%�%�%�.�%�%�%�N?-�?-�?-�?-�?-�4�?-�?-�?-�JoA�oA�oA�oA�oA�E�M�oA�oA�oA�bON�ON�ON�ON�ON�ON�ON�ON�b&#�&#�&#�&#�&#�8�&#�&#�&#�P*�*�*�*�*�*�*�*�*�*� *�*�*�*�*�$;�$6�*�*�*�4�z����O�O�O�/�/�/�/�/�/�/�/�
�	�/�	0�	0��F�� � ��%�%�%�� � ���%�8�8�8�� � ���!1�!1�d� �K�K�K��+�+�-�-�-�
��6�7�7�7�
��[�\�\�\�	�� � �"�"�"�"�� �	�	�	��E�;�<�<�<��C�H�Q�K�K�K�K�K�	��������������������������sI�A�A�A�A6G�F!� G�! G�G�G�G�G�G