AlkantarClanX12

Your IP : 3.144.2.5


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/runpy.cpython-312.opt-1.pyc

�

�Q�fU2���dZddlZddlZddlZddlZddlZddgZee�Z	Gd�de
�ZGd�de
�Z			dd	�Z
			dd
�Zefd�ZGd�d
e�Zdd�Z		dd�Zefd�Zd�Zdd�Zedk(rMeej4�dkredej8��yej4d=eej4d�yy)aZrunpy.py - locating and running Python code using the module namespace

Provides support for locating and running Python scripts using the Python
module namespace instead of the native filesystem.

This allows Python code to play nicely with non-filesystem based PEP 302
importers when locating support scripts as well as when importing modules.
�N�
run_module�run_pathc�"�eZdZdZd�Zd�Zd�Zy)�_TempModulezCTemporarily replace a module in sys.modules with an empty namespacec�@�||_t|�|_g|_y�N)�mod_name�
ModuleType�module�
_saved_module��selfr	s  �,/opt/alt/python312/lib64/python3.12/runpy.py�__init__z_TempModule.__init__s�� ��
� ��*������c���|j}	|jjtj|�|jtj|<|S#t
$rY�*wxYwr)r	r�append�sys�modules�KeyErrorrr
s  r�	__enter__z_TempModule.__enter__!sZ���=�=��	����%�%�c�k�k�(�&;�<�!%������H������	��	�s�,A�	A%�$A%c���|jr2|jdtj|j<g|_ytj|j=g|_y�Nr)rrrr	�r�argss  r�__exit__z_TempModule.__exit__*sL�����)-�);�);�A�)>�C�K�K��
�
�&� ������D�M�M�*���rN)�__name__�
__module__�__qualname__�__doc__rrr�rrrrs��M� �
� rrc��eZdZd�Zd�Zd�Zy)�_ModifiedArgv0c�>�||_t�x|_|_yr)�value�object�_saved_value�	_sentinel)rr%s  rrz_ModifiedArgv0.__init__2s����
�-3�X�5���D�Nrc��|j|jurtd��tjd|_|j
tjd<y)NzAlready preserving saved valuer)r'r(�RuntimeErrorr�argvr%)rs rrz_ModifiedArgv0.__enter__6sA�����D�N�N�2��?�@�@��H�H�Q�K����j�j�����rc�`�|j|_|jtjd<yr)r(r%r'rr+rs  rrz_ModifiedArgv0.__exit__<s ���^�^��
��'�'�����rN)rrrrrrr!rrr#r#1s��6�!�(rr#c	���|�|j|�|�d}|}d}	n2|j}|j}|j}	|�|j}|j|||	d|||��t||�|S)z)Helper to run code in nominated namespaceN)r�__file__�
__cached__r �
__loader__�__package__�__spec__)�update�loader�origin�cached�parent�exec)
�code�run_globals�init_globalsr	�mod_spec�pkg_name�script_namer4�fnamer6s
          r�	_run_coder@As��������<�(��������������������������H����(�"'�$*�!%�$*�%-�"*�
�,�	��{���rc�.�|�|n|j}t|�5}t|�5|jj}t|||||||�ddd�ddd�j
�S#1swY�!xYw#1swYj
�SxYw)z5Helper to run code in new namespace with sys modifiedN)r5rr#r�__dict__r@�copy)	r9r;r	r<r=r>r?�temp_module�mod_globalss	         r�_run_module_coderF[s���$�+�K����E�	�X�	�+�~�e�/D�!�(�(�1�1���$��\��H�h��	=�0E�	������
0E�/D��	������s"�A<�(A0�A<�0A9	�5A<�<Bc	��|jd�r|d��|jd�\}}}|rc	t|�t
jj|�}|�6t|d�s*ddl	m
}dj||��}|t|��	tjj|�}|�|d|z��|j,�0|dk(s|j'd�r|d��	|dz}
t/|
|�S|j0}|�|d|z��	|j3|�}|�|d|z��|||fS#t$rE}|j�-|j|k7r|j|jdz�s�Yd}~��Fd}~wwxYw#tt t"t$f$rT}	d}|j'd	�r|d
|dd�d|�d
�z
}||j|t)|	�j*|	��|	�d}	~	wwxYw#|$r&}|t
jvr�||�d|�d���d}~wwxYw#t$r}|t|��|�d}~wwxYw)N�.z#Relative module names not supported�__path__r)�warnz�{mod_name!r} found in sys.modules after import of package {pkg_name!r}, but prior to execution of {mod_name!r}; this may result in unpredictable behaviour)r	r=z:Error while finding module specification for {!r} ({}: {})z.pyz
. Try using '���z' instead of 'z' as the module name.zNo module named %s�__main__z	.__main__z%Cannot use package as __main__ modulez; z- is a package and cannot be directly executedz0%r is a namespace package and cannot be executedzNo code object available for %s)�
startswith�
rpartition�
__import__�ImportError�namerr�get�hasattr�warningsrJ�format�RuntimeWarning�	importlib�util�	find_spec�AttributeError�	TypeError�
ValueError�endswith�typer�submodule_search_locations�_get_module_detailsr4�get_code)
r	�errorr=�_�e�existingrJ�msg�spec�ex�
pkg_main_namer4r9s
             rr`r`is������3���9�:�:��(�(��-�N�H�a���	��x� ��;�;�?�?�8�,������*�(E�%��#�F�H�x�F�H�
�
���$�%�
I��~�~�'�'��1���|��(�8�3�4�4��&�&�2��z�!�X�%6�%6�{�%C��?�@�@�	G�$�{�2�M�&�}�e�<�<��[�[�F�
�~��F�CK�L�M�	M�&����x�(���|��5��@�A�A��T�4����g�	��v�v�~�!�&�&�H�"4� �+�+�A�F�F�S�L�9����
	��&
���J�?�I�K�����U�#��m�H�S�b�M�?�3� �z�!6�8�
9�C��C�J�J�x��b��):�):�B�?�@�b�H��I��"�	G��s�{�{�*���9:�H�F�G�
G��	G���&��F�1�I��A�%��&�s`�D:�F�,G;�H)�:	F�:F�F�G8�$AG3�3G8�;H&�!H!�!H&�)	I	�2I�I	c��eZdZdZy)�_ErrorzBError that _run_module_as_main() should report without a tracebackN)rrrr r!rrrkrk�s��Lrrkc�x�	|s|dk7rt|t�\}}}ntt�\}}}tjdj}|rjtjd<t|dd�S#t$r4}tj�d|��}tj
|�Yd}~��d}~wwxYw)a�Runs the designated module in the __main__ namespace

       Note that the executed module will have full access to the
       __main__ namespace. If this is not desirable, the run_module()
       function should be used to run the module code in a fresh namespace.

       At the very least, these variables in __main__ will be overwritten:
           __name__
           __file__
           __cached__
           __loader__
           __package__
    rLz: Nr)r`rk�_get_main_module_detailsr�
executable�exitrrBr5r+r@)r	�
alter_argvr<r9�excrf�main_globalss       r�_run_module_as_mainrs�s������Z�/�':�8�V�'L�$�H�h��'?��'G�$�H�h���;�;�z�*�3�3�L���o�o�������T�<����+�+��
���.�.�#�.������
�
���s�/A<�<	B9�*B4�4B9c�f�t|�\}}}|�|}|rt||||�St|i|||�S)u"Execute a module's code without importing it.

       mod_name -- an absolute module name or package name.

       Optional arguments:
       init_globals -- dictionary used to pre-populate the module’s
       globals dictionary before the code is executed.

       run_name -- if not None, this will be used for setting __name__;
       otherwise, __name__ will be set to mod_name + '__main__' if the
       named module is a package and to just mod_name otherwise.

       alter_sys -- if True, sys.argv[0] is updated with the value of
       __file__ and sys.modules[__name__] is updated with a temporary
       module object for the module being executed. Both are
       restored to their original values before the function returns.

       Returns the resulting module globals dictionary.
    )r`rFr@)r	r;�run_name�	alter_sysr<r9s      rrr�sI��* 3�8�<��H�h���������l�H�h�G�G���r�<��8�D�Drc�:�d}tj|}tj|=	t|�|tj|<S#t$r3}|t	|�vr |d|�dtj
d���|��d}~wwxYw#|tj|<wxYw)NrLzcan't find z module in r)rrr`rP�str�path)rb�	main_name�
saved_mainrqs    rrmrm�s���
�I����Y�'�J����I��,�"�9�-�",����I���
����C�� ��(�#�(�(�1�+�7�8�=@�
A�
��	��",����I��s#�
A�	B�.A=�=B�B�Bc�H�ddlm}tjj	|�}tj|�5}||�}ddd��;tj|�5}t|j�|d�}ddd�|S|S#1swY�HxYw#1swY|SxYw)Nr)�	read_coder8)	�pkgutilr}�osry�abspath�io�	open_code�compile�read)r?r}�	code_path�fr9s     r�_get_code_from_filer��s|��!�������&�I�	���i�	 �A���|��
!��|�
�\�\�)�
$���1�6�6�8�U�F�3�D�%��K�4�K�

!�	 ��%��K�s�	B�#B�B�B!c
�\�|�d}|jd�d}ddlm}||�}tj|�}t|t
d��rt|�}t|||||��Stjjd|�	t�\}}}t|�5}	t|�5|	jj }
t#||
||||�j%�cddd�cddd�	tjj'|�S#t($rYSwxYw#1swYnxYw	ddd�n#1swYnxYw	tjj'|�y#t($rYywxYw#	tjj'|�w#t($rYwwxYwxYw)uExecute code located at the specified filesystem location.

       path_name -- filesystem location of a Python script, zipfile,
       or directory containing a top level __main__.py script.

       Optional arguments:
       init_globals -- dictionary used to pre-populate the module’s
       globals dictionary before the code is executed.

       run_name -- if not None, this will be used to set __name__;
       otherwise, '<run_path>' will be used for __name__.

       Returns the resulting module globals dictionary.
    Nz
<run_path>rHr)�get_importer)r=r>)rNr~r�r�fsdecode�
isinstancer^r�rFrry�insertrmrr#rrBr@rC�remover\)�	path_namer;rur=r��importerr9r	r<rDrEs           rrrs}�������"�"�3�'��*�H�$��I�&�H����I�&�I��(�D��J�'�#�9�-����l�H�)1�y�J�	J�
	������9�%�	�(@�'A�$�H�h���X�&�+��	�*�)�0�0�9�9�� ��{�L�$,�h��B�BF�$�&�	
I�
I�
I�
������	�*���
��
��+�*��*�'�&�&��
������	�*���
��
��
������	�*���
��
�s��
E:�&D>�24D(�&	D>�/	E:�9D�	D%�$D%�(D1	�-D>�5	E:�>E�E:�E+�+	E7�6E7�:F+�<F�F+�	F(�%F+�'F(�(F+rL�z!No module specified for execution)�file)NNNNN)T)NNF)NN)r r�importlib.machineryrW�importlib.utilr�r�__all__r^r
r&rr#r@rFrPr`�	Exceptionrkrsrrmr�rr�lenr+�print�stderrr!rr�<module>r�s�������	�	��*���
�#�Y�
� �&� �.
(�V�
(� /3�&*�)-��4)-�,0�/3��)4�; �zM�Y�M�+�8'+�(-�E�<$/�,�&
�0�f�z��
�3�8�8�}�q��
�1��
�
�C��H�H�Q�K��C�H�H�Q�K�(�
r