$63 GRAYBYTE WORDPRESS FILE MANAGER $87

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 88.222.243.164 | ADMIN IP 216.73.216.143
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/__pycache__/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/__pycache__//Remote.cpython-37.pyc
B

�]>=�@s dZddlmZddlmZddlmZmZddlTddl	m
Z
ddlmZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZGd	d
�d
e�ZGdd�d�ZGd
d�dej�ZGdd�d�ZGdd�d�ZGdd�dej�Zdd�Z dd�Z!da"da#e
�$e!�dS)z4
    Support remote access to a Python interpreter.
�)�cmd)�hpy)�heapyc�Target)�*)�Console)�	mutbitsetNc@seZdZdS)�SocketClosedN)�__name__�
__module__�__qualname__�r
r
�E/opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/Remote.pyr	sr	c@seZdZdd�Zdd�ZdS)�IsolatedCallercCs
||_dS)N)�func)�selfrr
r
r�__init__"szIsolatedCaller.__init__cOs|j||�S)N)r)r�args�kwdsr
r
r�__call__%szIsolatedCaller.__call__N)r
rrrrr
r
r
rrsrc@seZdZddd�ZdS)�QueueWithReadline���cCs0x*y|jdd�Stjk
r&wYqXqWdS)Ng�?)�timeout)�get�queue�Empty)r�sizer
r
r�readline*s
zQueueWithReadline.readlineN)r)r
rrrr
r
r
rr)src@s*eZdZdd�Zedd��Zd	dd�ZdS)
�InterruptableSocketcCs<||_|jj|_|jj|_|jj|_|jj|_|jj|_dS)N)�_backing�fileno�close�readable�writable�seekable)rZbackingr
r
rr6s



zInterruptableSocket.__init__cCs|jjS)N)r�closed)rr
r
rr%>szInterruptableSocket.closedrcCs(xt�|gggd�dsqW|j�|�S)Ng�?r)�selectr�read)rrr
r
rr'BszInterruptableSocket.readN)r)r
rrr�propertyr%r'r
r
r
rr5src@s(eZdZdd�Zd	dd�Zd
dd�ZdS)�	NotiInputcCs||_||_dS)N)�input�output)rr*r+r
r
rrJszNotiInput.__init__rcCs
|�|�S)N)r)rrr
r
rr'NszNotiInput.readcCs|j�t�|j�|�S)N)r+�writeZREADLINEr*r)rrr
r
rrRszNotiInput.readlineN)r)r)r
rrrr'rr
r
r
rr)Is
r)c@s�eZdZejZejZdZdZ	d-dd�Z
dd�Zdd	�Zd
d�Z
dd
�Zdd�Zdd�ZejjZdd�ZeZdd�Zdd�ZdZdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Z d'd(�Z!d)d*�Z"d+d,�Z#dS).�Annexrz<Annex> NcCshtj�|�|dkrt}t|f|_||_|jjd�	|j
�|_d|_d|_
t��|_i|_|�d�dS)Nzguppy.heapy.Remoter�)r�CmdrZ	HEAPYPORTZ	LOCALHOST�server_address�target�sys�modulesr�asynch_closer!�socket�isclosed�_thread�
allocate_lock�	closelock�	intlocals�do_reset)rr1�portr
r
rr]s


zAnnex.__init__cCsX|j��z|js d|_|��Wd|j��Xx"t|d�rR|j��rRt�	d�q2WdS)N��thg�?)
r9�acquirer6�
disconnect�release�hasattrr>�is_alive�time�sleep)rr
r
rr4ns
zAnnex.asynch_closecCs�t�|j|j�|_x`|jsny|j�|j�Wn<tk
rB�Yqtjk
rh|jrZ�t�	d�YqXPqWdSt
j|jjddd�ddd�|_
tt
jt|jjddd��ddd�|j
�|_tj|_|��tjj||j|j
d	�dS)
N��wbr)�	bufferingzutf-8T)�encoding�
write_through�rb)�stdin�stdout)r5�address_family�socket_typer6�connectr0�
SystemExit�errorrDrE�io�
TextIOWrapper�makefilerMr)rrLr2�stderr�start_ki_threadrr/r)rr
r
rrP�s,
z
Annex.connectcsbt���j�t��jd��_�j�����fdd�}tj|dd��_�jdj	�j_	�j�
�dS)N)r*r+c
stzRxL��jkrN�j��}|sP|tkrB��jkrLt��jjt�q��	|�qWWd��jkrnt��jjt
�XdS)N)r5r*rZKEYBOARDINTERRUPTr�
set_async_excr1�annex_thread�KeyboardInterrupt�putr	)�line)�ostdinrrr5r
r�run�s




z"Annex.start_ki_thread.<locals>.runr
)r1r�hp)rrLr)r+r5�	threading�Threadr>r:�_hiding_tag_�start)rr^r
)r]rrr5rrW�s
zAnnex.start_ki_threadcCs�|j}|dkrdSd|_y|�t�Wntk
r:YnXy|�tj�Wntk
r`YnXy|��Wntk
r�YnXdt_dS)N)	r5�sendZDONE�	Exception�shutdown�	SHUT_RDWRr!r2�last_traceback)r�sockr
r
rr@�s"zAnnex.disconnectcCs|��dS)Nr=)r4)r�argr
r
r�do_close�szAnnex.do_closecCstd|jd�dS)Na�close
-----
Close and disable this remote connection completely.  It can then not
be reopened other than by some command from within the target process.

Normally you shouldn't need to use this command, because you can
return to the Monitor via other commands (<Ctrl-C> or .) keeping the
connection open.

But it might be useful when you want to get rid of the remote control
interpreter and thread, if it uses too much memory or disturbs the
target process in some other way.)�file)�printrM)rr
r
r�
help_close�szAnnex.help_closecCstd|jd�dS)Nz�h(elp)
-----
Without argument, print the list of available commands.
With a command name as argument, print help about that command.)rl)rmrM)rr
r
r�help_h�szAnnex.help_hcCsltj}tj}tj}z@|jt_|jt_|jt_ttjtj|jd�}|�d|j�Wd|t_|t_|t_XdS)N)rLrM�localsz8Remote interactive console. To return to Annex, type %r.)r2rLrMrVrr:ZinteractZEOF_key_sequence)rrjr]ZostdoutZostderrZconr
r
r�do_int�s

zAnnex.do_intcCstd|jd�dS)Na{int
-----
Interactive console.
Bring up a Python console in the Remote Control interpreter.

This console will initially have access to a heapy constructor, named
hpy, and a ready-made instance, named hp, and the target (see also the
reset command).  Other things may be imported as needed.

After returning to the Annex (by q) or to the Monitor (by . or
<Ctrl-C>), the data in the interactive console will remain there - and
will be available till the next time the console is entered.  But the
data may be cleared and reset to the initial state - a new heapy
instance will be created - by the 'reset' command of Annex.

It should be noted that the interpreter thread under investigation is
executing in parallell with the remote control interpreter. So there
may be some problems to do with that if both are executing at the same
time. This has to be dealt with for each case specifically.)rl)rmrM)rr
r
r�help_intszAnnex.help_intZ a1e55f5dc4c9f708311e9f97b8098cd3c	Cs�|jd}g}||_g}||j|j<td|j�|||jd|j|g}|��}|j|�|@r�td|jd�xZt|�D]>\}}|�|�|@rttd||jd�t|�|�j	|jd�qtWntd|jd�|`|j|j=dS)Nr_�0�__builtins__zIsolation test failed.)rlz)-- Shortest Path(s) to testobjects[%d] --zIsolation test succeeded.)
r:Z_a�_bname�eval�heapZisormrM�	enumerateZshpaths)	rrjr_�a�bZtestobjects�h�i�vr
r
r�do_isolatest#s,
zAnnex.do_isolatestcCstd|jd�dS)Nadisolatest
----------
Isolation test.

Test that the target interpreter heap view is isolated from the data
in the remote control interpreter. Data introduced here, eg in the
interactive console, should not be seen in the heap as reported by
hp.heap() etc. This is achieved by setting hp to not follow the
calling interpreter root.  However, this isolation may become broken.
This test is intended to diagnose this problem. The test checks that
none of a number of test objects is visible in the target heap
view. If the test failed, it will show the shortest path(s) to each of
the test objects that was visible.)rl)rmrM)rr
r
r�help_isolatestAszAnnex.help_isolatestcCs td|jd�td|jd�dS)Nz(To return to Monitor, type <Ctrl-C> or .)rlz4To close this connection ('permanently'), type close)rmrM)rrjr
r
r�do_qPsz
Annex.do_qcCstd|jd�dS)Nz�q
-----
Quit.

This doesn't currently do anything except printing a message.  (I
thought it would be too confusing to have a q (quit) command from the
Annex, when there was a similarly named command in the Monitor.))rl)rmrM)rr
r
r�help_qTszAnnex.help_qcCs:|j��|j�|j|��|jd��|jd|jd<dS)N)rr_r1r_r{)r:�clear�updaterr1)rrjr
r
rr;]s
zAnnex.do_resetcCstd|jd�dS)Nareset
-----
Reset things to an initial state.

This resets the state of the interactive console data only, for now.
It is reinitialized to contain the following:

hpy     --- from guppy import hpy
hp      --- hp = hpy()
target  --- a reference to some data in the target interpreter
h       --- h = hp; h is a shorthand for hp

(The hpy function is modified here from the normal one so
it sets some options to make it be concerned with the target
interpreter heap under investigation rather than the current one.)
)rl)rmrM)rr
r
r�
help_resethszAnnex.help_resetcCs�td|jd�td|jd�td|jjj|jd�td|jjj|jd�td|jj|jd�td|jj|jd�td|jd�dS)NzTarget overview)rlz$------------------------------------ztarget.sys.executable   = %sztarget.sys.argv         = %sztarget.wd               = %sztarget.pid              = %d)rmrMr1r2�
executable�argv�wd�pid)rrjr
r
r�do_statzsz
Annex.do_statcCstd|jd�dS)Na�stat
-----
Print an overview status table, with data from the target interpreter.

In the table, sys.executable and sys.argv means the current values of
those attributes in the sys module of the target interpreter. The row
labeled target.wd is the working directory of the target interpreter,
at the time the Remote Control interpreter was started (the actual
working directory may have changed since that time). The row labeled
target.pid is the process id of the target interpreter.

)rl)rmrM)rr
r
r�	help_stat�szAnnex.help_statcOsHddlm}|||�}d|j_|j|j_|j|j_|j|jj_d|_|S)Nr)rr=zhp.)�guppyrZViewZis_hiding_calling_interpreterr1rbr!Zreprefix)rrrrr_r
r
rr�s


z	Annex.hpycCs�z�x�|js�|��|js�|�d�xty|��Wq$tk
rFPYq$tk
r�ytj|jd�Wn$tk
r�tjt	jd�PYnXw$Yq$Xq$W|�
�qWWd|��XdS)Nr.)rl)r6rPr�Zcmdloopr	re�	traceback�	print_excrMr2r@r4)rr
r
rr^�s&
z	Annex.run)N)$r
rrr5�AF_INETrN�SOCK_STREAMrOZuse_rawinput�promptrr4rPrWr@rkrnrr/Zdo_helpZdo_hroZ	help_helprqrrrur~rr�r�r;r�r�r�rr^r
r
r
rr-Ws6
#	

r-cCsBtdk	rdSttdd�rdSd}t��at�|dti�att_dS)NZ#_is_guppy_heapy_remote_interpreter_rz�# Set a flag to stop recursion when importing site
# in case sitecustomize tries to do Remote.on()
import sys
sys._is_guppy_heapy_remote_interpreter_ = 1
import site
from guppy.heapy import Remote
Remote.Annex(target).run()
r1)rY�getattrr2rr1rZinterpreter)Zstart_annexr
r
r�on�s	r�c	Cs�tdkrdSxDtd�D]6}y
tj}Wntk
rBt�d�YqX|�PqW�t�tt	�x"t
tjdt�stPq`t�d�q`WdaadS)N�
g�������?z
t%d_async_exc)rY�ranger1r!�AttributeErrorrDrErrXrQrBZ	RootState)r|r!r
r
r�off�s 
r�)%�__doc__Z	guppy.etcrr�rZguppy.heapyrrZguppy.heapy.RemoteConstantsZguppy.heapy.ConsolerZ
guppy.setsr�atexitrSrr&r5r2rDr7r`r�rer	r�Queuerrr)r/r-r�r�rYr1�registerr
r
r
r�<module>s:
d

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.26 PM
root / 996
0755
Classifiers.cpython-37.opt-1.pyc
51.062 KB
14 Nov 2023 12.40 PM
root / 996
0644
Classifiers.cpython-37.pyc
51.062 KB
14 Nov 2023 12.40 PM
root / 996
0644
Console.cpython-37.opt-1.pyc
1.15 KB
14 Nov 2023 12.40 PM
root / 996
0644
Console.cpython-37.pyc
1.15 KB
14 Nov 2023 12.40 PM
root / 996
0644
Doc.cpython-37.opt-1.pyc
13.346 KB
14 Nov 2023 12.40 PM
root / 996
0644
Doc.cpython-37.pyc
13.346 KB
14 Nov 2023 12.40 PM
root / 996
0644
ImpSet.cpython-37.opt-1.pyc
1.248 KB
14 Nov 2023 12.40 PM
root / 996
0644
ImpSet.cpython-37.pyc
1.248 KB
14 Nov 2023 12.40 PM
root / 996
0644
Monitor.cpython-37.opt-1.pyc
14.034 KB
14 Nov 2023 12.40 PM
root / 996
0644
Monitor.cpython-37.pyc
14.034 KB
14 Nov 2023 12.40 PM
root / 996
0644
OutputHandling.cpython-37.opt-1.pyc
10.647 KB
14 Nov 2023 12.40 PM
root / 996
0644
OutputHandling.cpython-37.pyc
10.647 KB
14 Nov 2023 12.40 PM
root / 996
0644
Part.cpython-37.opt-1.pyc
22.034 KB
14 Nov 2023 12.40 PM
root / 996
0644
Part.cpython-37.pyc
22.034 KB
14 Nov 2023 12.40 PM
root / 996
0644
Path.cpython-37.opt-1.pyc
18.788 KB
14 Nov 2023 12.40 PM
root / 996
0644
Path.cpython-37.pyc
18.788 KB
14 Nov 2023 12.40 PM
root / 996
0644
Prof.cpython-37.opt-1.pyc
69.813 KB
14 Nov 2023 12.40 PM
root / 996
0644
Prof.cpython-37.pyc
69.813 KB
14 Nov 2023 12.40 PM
root / 996
0644
RM.cpython-37.opt-1.pyc
0.2 KB
14 Nov 2023 12.40 PM
root / 996
0644
RM.cpython-37.pyc
0.2 KB
14 Nov 2023 12.40 PM
root / 996
0644
RefPat.cpython-37.opt-1.pyc
17.904 KB
14 Nov 2023 12.40 PM
root / 996
0644
RefPat.cpython-37.pyc
17.904 KB
14 Nov 2023 12.40 PM
root / 996
0644
Remote.cpython-37.opt-1.pyc
13.478 KB
14 Nov 2023 12.40 PM
root / 996
0644
Remote.cpython-37.pyc
13.478 KB
14 Nov 2023 12.40 PM
root / 996
0644
RemoteConstants.cpython-37.opt-1.pyc
0.294 KB
14 Nov 2023 12.40 PM
root / 996
0644
RemoteConstants.cpython-37.pyc
0.294 KB
14 Nov 2023 12.40 PM
root / 996
0644
Spec.cpython-37.opt-1.pyc
57.61 KB
14 Nov 2023 12.40 PM
root / 996
0644
Spec.cpython-37.pyc
57.61 KB
14 Nov 2023 12.40 PM
root / 996
0644
Target.cpython-37.opt-1.pyc
0.527 KB
14 Nov 2023 12.40 PM
root / 996
0644
Target.cpython-37.pyc
0.527 KB
14 Nov 2023 12.40 PM
root / 996
0644
UniSet.cpython-37.opt-1.pyc
76.823 KB
14 Nov 2023 12.40 PM
root / 996
0644
UniSet.cpython-37.pyc
76.823 KB
14 Nov 2023 12.40 PM
root / 996
0644
Use.cpython-37.opt-1.pyc
19.477 KB
14 Nov 2023 12.40 PM
root / 996
0644
Use.cpython-37.pyc
19.477 KB
14 Nov 2023 12.40 PM
root / 996
0644
View.cpython-37.opt-1.pyc
16.982 KB
14 Nov 2023 12.40 PM
root / 996
0644
View.cpython-37.pyc
16.982 KB
14 Nov 2023 12.40 PM
root / 996
0644
__init__.cpython-37.opt-1.pyc
0.526 KB
14 Nov 2023 12.40 PM
root / 996
0644
__init__.cpython-37.pyc
0.526 KB
14 Nov 2023 12.40 PM
root / 996
0644
pbhelp.cpython-37.opt-1.pyc
10.567 KB
14 Nov 2023 12.40 PM
root / 996
0644
pbhelp.cpython-37.pyc
10.567 KB
14 Nov 2023 12.40 PM
root / 996
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF