
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
U
    ¡ê,a   ã                   @   sV   d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZmZ G dd„ dejƒZdS )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 Zd ZdZdZdd„ ZdS )ÚFixExecfileTz«
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    c                 C   s&  |d }|  d¡}|  d¡}|jd jd  ¡ }t| ¡ tƒ tddƒg|d�}ttjt	dƒ|gƒ}ttj
tƒ t	d	ƒgƒttj
tƒ tƒ gƒg}	|g|	 }
| ¡ }d|_td
dƒ}|
tƒ |tƒ |g }tt	dƒ|dƒ}|g}|d k	rô| tƒ | ¡ g¡ |d k	�r| tƒ | ¡ g¡ tt	dƒ||jd�S )NÚfilenameÚglobalsÚlocalséÿÿÿÿz"rb"ú )ZrparenÚopenÚreadz'exec'ÚcompileÚ Úexec)Úprefix)ÚgetZchildrenZcloner
   r   r   r	   r   Zpowerr   Ztrailerr   r   r   r   r   Úextend)ÚselfZnodeZresultsr   r   r   Zexecfile_parenZ	open_argsZ	open_callr   Z	open_exprZfilename_argZexec_strZcompile_argsZcompile_callÚargs© r   ú?/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_execfile.pyÚ	transform   s.    

ÿÿ


zFixExecfile.transformN)Ú__name__Ú
__module__Ú__qualname__ZBM_compatibleZPATTERNr   r   r   r   r   r      s   r   N)Ú__doc__r   r   Z
fixer_utilr   r   r   r   r   r   r	   r
   r   r   ZBaseFixr   r   r   r   r   Ú<module>   s   0