|
Server IP : 111.118.215.156 / Your IP : 216.73.216.76 Web Server : Apache System : Linux md-in-26.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : azasoqqa ( 1858) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /lib64/python3.6/lib2to3/fixes/__pycache__/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
3
\ � @ sV d Z ddlmZ ddlmZmZmZmZmZm Z m
Z
mZmZm
Z
G dd� 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 @ s e Zd ZdZdZdd� ZdS )�FixExecfileTz�
power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
|
power< 'execfile' trailer< '(' filename=any ')' > >
c C s0 |st �|d }|jd�}|jd�}|jd jd j� }t|j� t� tdd�g|d�}ttj t
d�|g�}ttjt� t
d �g�ttjt
� t� g�g} |g| }
|j� }d|_td
d�}|
t� |t� |g }
tt
d�|
d�}|g}|d k � r�|jt� |j� g� |d k �r|jt� |j� g� tt
d
�||jd�S )N�filename�globals�locals� z"rb"� )Zrparen�open�readz'exec'�compile� �exec)�prefix���r )�AssertionError�getZchildrenZcloner
r r r r Zpowerr Ztrailerr r r r r �extend)�selfZnode�resultsr r r Zexecfile_parenZ open_argsZ open_callr Z open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args� r �$/usr/lib64/python3.6/fix_execfile.py� transform s,
zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr"