AlkantarClanX12

Your IP : 13.58.34.132


Current Path : /opt/alt/python310/lib64/python3.10/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/lib2to3/fixes/__pycache__/fix_execfile.cpython-310.opt-1.pyc

o

6��f�@sVdZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)zoFixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs$|d}|�d�}|�d�}|jdjd��}t|��t�tdd�g|d�}ttjt	d�|g�}ttj
t�t	d	�g�ttj
t�t
�g�g}	|g|	}
|��}d|_td
d�}|
t�|t�|g}
tt	d�|
d�}|g}|durz|�t�|��g�|dur�|�t�|��g�tt	d
�||jd�S)N�filename�globals�locals���z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix)�get�childrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�A/opt/alt/python310/lib64/python3.10/lib2to3/fixes/fix_execfile.py�	transforms.

��

zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr rrrrr
sr
N)�__doc__rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr�<module>s0