403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgdemandimport/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgdemandimport/__pycache__/demandimportpy2.cpython-39.opt-1.pyc
a

�+�b�+�@s�dZddlmZddlZddlZddlZddlmZej	Z	e
Ze�Z
dd�ZGdd	�d	e�Zd
ejvZddd
�Ze�add�Zdd�Zdd�Zdd�Ze	dd��ZdS)aU
demandimport - automatic demandloading of modules

To enable this module, do:

  import demandimport; demandimport.enable()

Imports of the following forms will be demand-loaded:

  import a, b.c
  import a.b as c
  from a import b,c # a will be loaded immediately

These imports will not be delayed:

  from a import *
  b = __import__(a)
�)�absolute_importN�)�tracingcOs�z|||g|�Ri|��WSty�|s.�d|}|�dd�d}|�dd��dd�d}||krh�|||g|�Ri|��YS0dS)Nzhgext_%s�.rr�__name__�)�ImportError�split�get)�
importfunc�name�globals�args�kwargsZ	hgextnameZnamerootZcontextroot�r�D/usr/lib64/python3.9/site-packages/hgdemandimport/demandimportpy2.py�_hgextimport*src@sheZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zedd��Z
edd��ZdS)�
_demandmodzxmodule demand-loader and proxy

    Specify 1 as 'level' argument at construction, to import module
    relatively.
    c
CsVd|vr |�dd�\}}|g}n|}g}t�|d|||||t�f�t�|dd�dS)Nrr�_data�_module)r	�object�__setattr__�set)�selfrr
�locals�level�head�rest�afterrrr�__init__As�z_demandmod.__init__cCs|jd�|�dS)z%add to the list of submodules to load�N)r�append�rrrrr�_extendMsz_demandmod._extendcCs|jd�|�dS)a�Record that the named module ``name`` imports this module.

        References to this proxy class having the name of this module will be
        replaced at module load time. We assume the symbol inside the importing
        module is identical to the "head" name of this module. We don't
        actually know if "as X" syntax is being used to change the symbol name
        because this information isn't exposed to __import__.
        �N)r�addr"rrr�_addrefQs	z_demandmod._addrefcs"|j�st�d|jd���|j\}}}}}}tt|||d|�}||ur^|j}Wd�dS�fdd��|D]}�||�qn|r�|�|�|ur�|||<n|�|d�|ur�|||d<|D]2}	tj�|	d�}
|
r�t	|
|d�|ur�t
|
||�q�t�|d|�Wd�n1�s0YdS)Nzdemandimport %src	sh|d}}d|vr"|�dd�\}}t||t�turPt||t||j|jdd��n|rd�t||�|�dS�Nrr�r)r	�getattr�nothing�setattrr�__dict__)�mod�p�h�t��subloadrrr2us
�z!_demandmod._load.<locals>.subloadr-r)
rr�logrr�_origimportr
�sys�modulesr)r+rr)rrr
rrrZmodrefsr-�x�modnameZmodrefrr1r�_load\s,�


z_demandmod._loadcCs"|jrd|jdSd|jdS)Nz<proxied module '%s'>rz<unloaded module '%s'>)rr�rrrr�__repr__�sz_demandmod.__repr__cOstdt|���dS)Nz%s object is not callable)�	TypeError�repr)rrrrrr�__call__�sz_demandmod.__call__cCs|��t|j|�S�N)r9r)r)r�attrrrr�__getattr__�sz_demandmod.__getattr__cCs|��t|j||�dSr?)r9r+r)rr@�valrrrr�sz_demandmod.__setattr__cCs|��|jjSr?)r9rr,r:rrrr,�sz_demandmod.__dict__cCs|��|jjSr?)r9r�__doc__r:rrrrC�sz_demandmod.__doc__N)r�
__module__�__qualname__rCrr#r&r9r;r>rAr�propertyr,rrrrr:s8
rZ__pypy__���c
s��dus|tvs|dkr*tt||�||�S|s�d|vr�|�dd�\}}|rj|�dd�|krjt||�||�S|�vr�t�|t�r��|�|��|St||�|�S|�d����fdd�}dd�}|d	k�r�|r�tt||�|d
�}	||	|�}
n|t�rZ�}t	j
|}
t|
dt�tu�r0|�
dd�d	}t	j
|}
|dk�rl|�
d|d�d	}t	j
|}
ntt||�|d
�}
|D]}||
|��qp|
Stt||��}
||
|�}
|D]}||
|��q�|
SdS)N)�*rrrcs�t||t�}t|dt�tu}|turj|r,dSd|j|f}|tvrHt}nt}|||j�dd�}t|||��r�t|t�r�|�	��dS)aProcess an imported symbol in the import statement.

            If the symbol doesn't exist in the parent module, and if the
            parent module is a package, it must be a module. We set missing
            modules up as _demandmod instances.
            �__path__Nz%s.%srr()
r)r*r�ignoresr4rr,r+�
isinstancer&)r-r@�symbolZnonpkg�mnr�Z
globalnamerrr�processfromitem�sz&_demandimport.<locals>.processfromitemcSs�|}|�d�dd�D]f}t||t�}|turPt||j|jdd�}t|||�n(|jd|tjvrxtj|jd|}|}q|Sr')	r	r)r*rr,r+rr5r6)�rootmodr8r-�comp�objrrr�chainmodules�sz#_demandimport.<locals>.chainmodulesrr(rI)rJrr4r	r
rKrr#�_pypyr5r6r)r*�rsplit)
rr
r�fromlistr�baserrOrSrPr-rMr7rrNr�
_demandimport�sR


�



�
rXcCs|adSr?)rJ)Z	ignoresetrrr�init(srYcCs
tjtkSr?)�builtins�
__import__rXrrrr�	isenabled-sr\cCs
tt_dS)z'enable global demand-loading of modulesN)rXrZr[rrrr�enable1sr]cCs
tt_dS)z(disable global demand-loading of modulesN)r4rZr[rrrr�disable6sr^ccs6t�}|rt�zdVW|r2t�n|r0t�0dS)z;context manager for disabling demandimport in 'with' blocksN)r\r^r])Z
demandenabledrrr�deactivated;s�r_)NNNrG)rCZ
__future__rZ__builtin__rZ�
contextlibr5rr�contextmanagerr[r4rr*rr�builtin_module_namesrTrXrrJrYr\r]r^r_rrrr�<module>s&u

s

Youez - 2016 - github.com/yon3zu
LinuXploit