grthtrhthjhtyjytjytkergtrhtrjytjerhrfh3 \ã@sVdZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z Gdd„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@seZdZdZdZdd„ZdS)Ú FixExecfileTz« power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > > | power< 'execfile' trailer< '(' filename=any ')' > > cCs&|d}|jdƒ}|jdƒ}|jdjdjƒ}t|jƒtƒtddƒg|d�}ttjt dƒ|gƒ}ttj t ƒt d ƒgƒttj t ƒt ƒgƒg} |g| } |jƒ} d| _td dƒ} | tƒ| tƒ| g} tt d ƒ| d ƒ}|g}|dk rô|jtƒ|jƒgƒ|dk �r|jtƒ|jƒgƒtt d ƒ||jd�S)NÚfilenameÚglobalsÚlocalséz"rb"ú )ZrparenÚopenÚreadz'exec'ÚcompileÚÚexec)Úprefixéÿÿÿÿr)ÚgetZchildrenZcloner rr r r ZpowerrZtrailerrrrrrÚextend)ÚselfZnodeZresultsrrrZexecfile_parenZ open_argsZ open_callrZ open_exprZ filename_argZexec_strZ compile_argsZ compile_callÚargs©rú2/usr/lib64/python3.6/lib2to3/fixes/fix_execfile.pyÚ transforms*     zFixExecfile.transformN)Ú__name__Ú __module__Ú __qualname__Z BM_compatibleZPATTERNr rrrrr sr N)Ú__doc__rrZ fixer_utilrrrrrrr r r r ZBaseFixr rrrrÚs 0