| Server IP : 66.29.146.62 / Your IP : 216.73.216.152 Web Server : LiteSpeed System : Linux premium231.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 User : dokkdzvi ( 925) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/ |
Upload File : |
3
� f�R � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZddlZdd� Zdd� Zd+dd�ZG d d
� d
ej�Zd,Zd
ZG dd� de
j�Zi Zejd�Zejd�ZG dd� de�ZG dd� de�Zdd� Z G dd� de�Z!G dd� de
j"e�Z#G dd� de�Z$G dd� de�Z%dd� Z&d d!� Z'G d"d#� d#e�Z(d$d%� Z)e*d&k�r�dd'l+m,Z, e,d(d)d*� dS )-a RPC Implementation, originally written for the Python Idle IDE
For security reasons, GvR requested that Idle's Python execution server process
connect to the Idle process, which listens for the connection. Since Idle has
only one client per server, this was not a limitation.
+---------------------------------+ +-------------+
| socketserver.BaseRequestHandler | | SocketIO |
+---------------------------------+ +-------------+
^ | register() |
| | unregister()|
| +-------------+
| ^ ^
| | |
| + -------------------+ |
| | |
+-------------------------+ +-----------------+
| RPCHandler | | RPCClient |
| [attribute of RPCServer]| | |
+-------------------------+ +-----------------+
The RPCServer handler class is expected to provide register/unregister methods.
RPCHandler inherits the mix-in class SocketIO, which provides these methods.
See the Idle run.main() docstring for further information on how this was
accomplished in Idle.
� Nc C s t j| �}t|tj�st�|S )z*Return code object from marshal string ms.)�marshal�loads�
isinstance�types�CodeType�AssertionError)�ms�co� r
�0/opt/alt/python36/lib64/python3.6/idlelib/rpc.py�
unpickle_code- s
r c C s$ t | tj�st�tj| �}t|ffS )zBReturn unpickle function and tuple with marshalled co code object.)r r r r r �dumpsr )r r r
r
r �pickle_code3 s
r c C s$ t j� }t||�}|j| � |j� S )z.Return pickled (or marshalled) string for obj.)�io�BytesIO�CodePickler�dump�getvalue)�objZprotocol�f�pr
r
r r
9 s
r
c @ s"