Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.142.135.53
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : runpy.cpython-38.pyc
U

�b/�@sdZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
ddgZGdd�de�Z
Gdd	�d	e�Zd d
d�Zd!dd
�Zefdd�ZGdd�de�Zd"dd�Zd#dd�Zefdd�Zdd�Zd$dd�Zedk�reej�dk�r�edejd�nejd=eejd�dS)%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)�	read_code�get_importer�
run_module�run_pathc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�_TempModulezCTemporarily replace a module in sys.modules with an empty namespacecCs||_t�|�|_g|_dS�N)�mod_name�typesZ
ModuleType�module�
_saved_module��selfr�r�,/usr/local/python-3.8/lib/python3.8/runpy.py�__init__sz_TempModule.__init__cCsB|j}z|j�tj|�Wntk
r0YnX|jtj|<|Sr)rr�append�sys�modules�KeyErrorr
rrrr�	__enter__ sz_TempModule.__enter__cGs.|jr|jdtj|j<n
tj|j=g|_dS�Nr)rrrr�r
�argsrrr�__exit__)s
z_TempModule.__exit__N)�__name__�
__module__�__qualname__�__doc__rrrrrrrrs	rc@s$eZdZdd�Zdd�Zdd�ZdS)�_ModifiedArgv0cCs||_t�|_|_dSr)�value�object�_saved_value�	_sentinel)r
rrrrr1sz_ModifiedArgv0.__init__cCs0|j|jk	rtd��tjd|_|jtjd<dS)NzAlready preserving saved valuer)r!r"�RuntimeErrorr�argvr)r
rrrr5sz_ModifiedArgv0.__enter__cGs|j|_|jtjd<dSr)r"rr!rr$rrrrr;sz_ModifiedArgv0.__exit__N)rrrrrrrrrrr0src
	Csn|dk	r|�|�|dkr(d}|}d}	n |j}|j}|j}	|dkrH|j}|j|||	d|||d�t||�|S)z)Helper to run code in nominated namespaceN)r�__file__�
__cached__r�
__loader__�__package__�__spec__)�update�loader�origin�cached�parent�exec)
�codeZrun_globals�init_globalsr�mod_spec�pkg_name�script_namer+�fnamer-rrr�	_run_code@s*
�
r6c	
Cs^|dkr|n|j}t|��6}t|��"|jj}t|||||||�W5QRXW5QRX|��S)z5Helper to run code in new namespace with sys modifiedN)r,rrr
�__dict__r6�copy)	r0r1rr2r3r4r5�temp_module�mod_globalsrrr�_run_module_codeZs�r;c
Cs2|�d�r|d��|�d�\}}}|r�zt|�WnHtk
rz}z*|jdksh|j|krj|�|jd�sj�W5d}~XYnXtj�|�}|dk	r�t|d�s�ddl	m
}dj||d�}|t|��zt
j�|�}WnJttttfk
�r}	z"d}||�|t|	�j|	��|	�W5d}	~	XYnX|dk�r2|d	|��|jdk	�r�|d
k�sT|�d��r\|d��z|d}
t|
|�WS|k
�r�}z"|tjk�r��|d
||f��W5d}~XYnX|j}|dk�r�|d|��z|�|�}Wn2tk
�r}z|t|��|�W5d}~XYnX|dk�r(|d|��|||fS)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)rr3z:Error while finding module specification for {!r} ({}: {})zNo module named %s�__main__z	.__main__z%Cannot use package as __main__ modulez3%s; %r 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�warningsr>�format�RuntimeWarning�	importlibZutil�	find_spec�AttributeError�	TypeError�
ValueError�typer�submodule_search_locations�endswith�_get_module_detailsr+�get_code)
r�errorr3�_�eZexistingr>�msg�specZexZ
pkg_main_namer+r0rrrrRhsd
��,
�
� 
rRc@seZdZdZdS)�_ErrorzBError that _run_module_as_main() should report without a tracebackN)rrrrrrrrrY�srYTc
Cs�z0|s|dkr t|t�\}}}ntt�\}}}Wn:tk
rj}zdtj|f}t�|�W5d}~XYnXtjdj}|r�|jtj	d<t
||dd|�S)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__
    r?z%s: %sNr)rRrY�_get_main_module_detailsr�
executable�exitrr7r,r$r6)rZ
alter_argvr2r0�excrWZmain_globalsrrr�_run_module_as_main�s�r^FcCs@t|�\}}}|dkr|}|r,t||||�St|i|||�SdS)znExecute a module's code without importing it

       Returns the resulting top level namespace dictionary
    N)rRr;r6)rr1�run_nameZ	alter_sysr2r0rrrr�sc
Cs�d}tj|}tj|=z\zt|�WW�NStk
rn}z*|t|�kr\|d|tjdf�|��W5d}~XYnXW5|tj|<XdS)Nr?zcan't find %r module in %rr)rrrRrC�str�path)rTZ	main_nameZ
saved_mainr]rrrrZ�s
��rZc	Csftj�t�|��}t�|��}t|�}W5QRX|dkr^t�|��}t|��|d�}W5QRX||fS)Nr/)	�osra�abspath�fsdecode�io�	open_coder�compile�read)r_r5Zdecoded_path�fr0rrr�_get_code_from_file�srjcCs$|dkrd}|�d�d}t|�}d}t|�jdkrFt|�jdkrFd}t|td��sX|rxt||�\}}t|||||d	�Stj	�
d|�znt
�\}}	}t|��P}
t|��<|
jj}t|||||	|���W5QR�W5QR�W�SQRXW5QRXW5ztj	�|�Wntk
�rYnXXdS)
a_Execute code located at the specified filesystem location

       Returns the resulting top level namespace dictionary

       The file path may refer directly to a Python script (i.e.
       one that could be directly executed with execfile) or else
       it may refer to a zipfile or directory containing a top
       level __main__.py script.
    Nz
<run_path>r<rFZimpZNullImporterT)r3r4)rArrOrr�
isinstancerjr;rra�insert�removerNrZrrr
r7r6r8)Z	path_namer1r_r3ZimporterZis_NullImporterr0r5rr2r9r:rrrr�s<
�
��8r?�z!No module specified for execution)�file)NNNNN)NNNNN)T)NNF)NN)rrZimportlib.machineryrJZimportlib.utilrer	rbZpkgutilrr�__all__r rrr6r;rCrR�	ExceptionrYr^rrZrjrr�lenr$�print�stderrrrrr�<module>sN��
�
:
�

1

© 2025 GrazzMean