parameters: (path)
return_statement: return execfile(path, {"__name__": "__main__", "__file__": path})
docstring: execfile() does not exist in Python 3
docstring_summary: execfile() does not exist in Python 3
docstring_tokens: execfile () does not exist in Python 3
function: def execfile_wrapper(path):
      """execfile() does not exist in Python 3"""
  
      # We need this ugly code in order to avoid wrapping the script execution in a try/except construct
      try:
          execfile
      except NameError:
          import runpy
          return runpy.run_path(path, init_globals={}, run_name="__main__")
      return execfile(path, {"__name__": "__main__", "__file__": path})
function_tokens: def execfile_wrapper ( path ) : # We need this ugly code in order to avoid wrapping the script execution in a try/except construct try : execfile except NameError : import runpy return runpy . run_path ( path , init_globals = { } , run_name = "__main__" ) return execfile ( path , { "__name__" : "__main__" , "__file__" : path } )