AlkantarClanX12

Your IP : 3.144.47.115


Current Path : /opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/fix_execfile.cpython-312.pyc

�

�Q�f��n�dZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
Gd�dej�Zy)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��eZdZdZdZd�Zy)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    c��|sJ�|d}|jd�}|jd�}|jdjdj�}t|j�t	�tdd�g|��}t
tjtd�|g�}t
tjt�td	�g�t
tjt�t�g�g}	|g|	z}
|j�}d|_td
d�}|
t	�|t	�|gz}
ttd�|
d�}|g}|�)|j!t	�|j�g�|�)|j!t	�|j�g�ttd
�||j��S)N�filename�globals�locals���z"rb"� )�rparen�open�readz'exec'�compile��exec)�prefix)�get�children�clonerrrr
r
�powerr�trailerr	rrrr�extend)�self�node�resultsrrr�execfile_paren�	open_args�	open_callr�	open_expr�filename_arg�exec_str�compile_args�compile_call�argss                �A/opt/alt/python312/lib64/python3.12/lib2to3/fixes/fix_execfile.py�	transformzFixExecfile.transforms|����w��:�&���+�+�i�(�����X�&�����r�*�3�3�B�7�=�=�?���X�^�^�-�u�w��v�s�8K�L�#1�3�	�����d�6�l�I�%>�?�	��T�\�\�C�E�4��<�#8�9��T�\�\�F�H�f�h�#7�8�:���K�$�&�	� �~�~�'��!����(�C�(�� �E�G�\�5�7�H�#M�M���D��O�\�2�>���~�����K�K���'�-�-�/�2�3����K�K���&�,�,�.�1�2��D��L�$�t�{�{�;�;�N)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr0�r1r/rrs���M��G�<r1rN)�__doc__rr�
fixer_utilrrrrrr	r
rrr
�BaseFixrr7r1r/�<module>r;s0����1�1�1�&<�*�$�$�&<r1