parameters: (self, is_module, entry_point_fn, module_name, file, globals, locals)
return_statement: return globals
docstring: This function should have frames tracked by unhandled exceptions (the `_exec` name is important).
docstring_summary: This function should have frames tracked by unhandled exceptions (the `_exec` name is important).
docstring_tokens: This function should have frames tracked by unhandled exceptions ( the _exec name is important ) .
function: def _exec(self, is_module, entry_point_fn, module_name, file, globals, locals):
          '''
          This function should have frames tracked by unhandled exceptions (the `_exec` name is important).
          '''
          if not is_module:
              pydev_imports.execfile(file, globals, locals)  # execute the script
          else:
              # treat ':' as a separator between module and entry point function
              # if there is no entry point we run we same as with -m switch. Otherwise we perform
              # an import and execute the entry point
              if entry_point_fn:
                  mod = __import__(module_name, level=0, fromlist=[entry_point_fn], globals=globals, locals=locals)
                  func = getattr(mod, entry_point_fn)
                  func()
              else:
                  # Run with the -m switch
                  import runpy
                  if hasattr(runpy, '_run_module_as_main'):
                      # Newer versions of Python actually use this when the -m switch is used.
                      if sys.version_info[:2] <= (2, 6):
                          runpy._run_module_as_main(module_name, set_argv0=False)
                      else:
                          runpy._run_module_as_main(module_name, alter_argv=False)
                  else:
                      runpy.run_module(module_name)
          return globals
function_tokens: def _exec ( self , is_module , entry_point_fn , module_name , file , globals , locals ) : if not is_module : pydev_imports . execfile ( file , globals , locals ) # execute the script else : # treat ':' as a separator between module and entry point function # if there is no entry point we run we same as with -m switch. Otherwise we perform # an import and execute the entry point if entry_point_fn : mod = __import__ ( module_name , level = 0 , fromlist = [ entry_point_fn ] , globals = globals , locals = locals ) func = getattr ( mod , entry_point_fn ) func ( ) else : # Run with the -m switch import runpy if hasattr ( runpy , '_run_module_as_main' ) : # Newer versions of Python actually use this when the -m switch is used. if sys . version_info [ : 2 ] <= ( 2 , 6 ) : runpy . _run_module_as_main ( module_name , set_argv0 = False ) else : runpy . _run_module_as_main ( module_name , alter_argv = False ) else : runpy . run_module ( module_name ) return globals