Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/lib2to3/fixes/fix_execfile.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@sydZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
dejfd��YZdS(soFixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
i(t
fixer_base(
tCommatNametCalltLParentRParentDottNodetArgListtStringtsymstFixExecfilecBseZeZdZd�ZRS(s�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs�|st�|d}|jd�}|jd�}|jdjdj�}t|j�gd|�}ttjtd�|g�}ttj	t
�td�g�ttj	t�t�g�g}	|g|	}
|j�}d|_
td	d�}|
t�|t�|g}
ttd
�|
d�}|g}|dk	r_|jt�|j�g�n|dk	r�|jt�|j�g�nttd�|d
|j
�S(Ntfilenametglobalstlocalsi�trparenuopenureadu u'exec'ucompileuuexectprefix(tAssertionErrortgettchildrentcloneRRR
tpowerRttrailerRRRRR	RRtNonetextend(tselftnodetresultsRR
Rtexecfile_parent	open_argst	open_calltreadt	open_exprtfilename_argtexec_strtcompile_argstcompile_calltargs((s0/sys/lib/python2.7/lib2to3/fixes/fix_execfile.pyt	transforms*
!
		(t__name__t
__module__tTruet
BM_compatibletPATTERNR&(((s0/sys/lib/python2.7/lib2to3/fixes/fix_execfile.pyRsN(t__doc__tRt
fixer_utilRRRRRRRRR	R
tBaseFixR(((s0/sys/lib/python2.7/lib2to3/fixes/fix_execfile.pyt<module>sF

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].