AlkantarClanX12
Current Path : /proc/self/root/usr/lib64/python3.8/lib2to3/fixes/__pycache__/ |
Current File : //proc/self/root/usr/lib64/python3.8/lib2to3/fixes/__pycache__/fix_execfile.cpython-38.opt-2.pyc |
U e5d � @ sR d dl mZ d dlmZmZmZmZmZmZm Z m Z mZmZ G dd� dej �ZdS )� )� 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 s& |d }|� d�}|� d�}|jd jd �� }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}|d k r�|�t� |�� g� |d k �r|�t� |�� g� tt d �||jd�S )N�filename�globals�locals���z"rb"� )Zrparen�open�readz'exec'�compile� �exec)�prefix)�getZchildrenZcloner r r r r Zpowerr Ztrailerr r r r r �extend)�selfZnodeZresultsr r r Zexecfile_parenZ open_argsZ open_callr Z open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args� r �2/usr/lib64/python3.8/lib2to3/fixes/fix_execfile.py� transform s. �� zFixExecfile.transformN)�__name__� __module__�__qualname__Z BM_compatibleZPATTERNr r r r r r s r N)r r Z fixer_utilr r r r r r r r r r ZBaseFixr r r r r �<module> s 0