7ec@sydZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z dejfdYZdS(soFixer for execfile. This converts usages of the execfile function into calls to the built-in exec() function. i(t fixer_base( tCommatNametCalltLParentRParentDottNodetArgListtStringtsymst FixExecfilecBseZeZdZdZRS(s power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > > | power< 'execfile' trailer< '(' filename=any ')' > > cCs|d}|jd}|jd}|jdjdj}t|jttddgd|}ttjt d|g}ttj t t d gttj t t gg} |g| } |j} d | _td d } | t| t| g} tt d | d }|g}|dk re|jt|jgn|dk r|jt|jgntt d|d|jS(Ntfilenametglobalstlocalsis"rb"t trparenuopenureadu u'exec'ucompileuuexectprefix(tgettchildrentcloneRRR RR tpowerRttrailerRRRRRtNonetextend(tselftnodetresultsR R Rtexecfile_parent open_argst open_calltreadt open_exprt filename_argtexec_strt compile_argst compile_calltargs((s2/usr/lib64/python2.7/lib2to3/fixes/fix_execfile.pyt transforms* $ !      (t__name__t __module__tTruet BM_compatibletPATTERNR&(((s2/usr/lib64/python2.7/lib2to3/fixes/fix_execfile.pyR sN(t__doc__tRt fixer_utilRRRRRRRRR R tBaseFixR (((s2/usr/lib64/python2.7/lib2to3/fixes/fix_execfile.pytsF