# coding: utf-8"""Fixer for the execfile() function on Py2, which was removed in Py3.The Lib/lib2to3/fixes/fix_execfile.py module has some problems: seepython-future issue #37. This fixer merely imports execfile() frompast.builtins and leaves the code alone.Adds this import line:: from past.builtins import execfilefor the function execfile() that was removed from Py3."""from__future__importunicode_literalsfromlib2to3importfixer_basefromlibfuturize.fixer_utilimporttouch_import_topexpression="name='execfile'"classFixExecfile(fixer_base.BaseFix):BM_compatible=Truerun_order=9PATTERN=""" power< ({0}) trailer< '(' args=[any] ')' > rest=any* > """.format(expression)deftransform(self,node,results):name=results["name"]touch_import_top(u'past.builtins',name.value,node)