parameters: (self, filename, source=None)
docstring: Execute an existing file
docstring_summary: Execute an existing file
docstring_tokens: Execute an existing file
function: def execfile(self, filename, source=None):
          "Execute an existing file"
          if source is None:
              with tokenize.open(filename) as fp:
                  source = fp.read()
                  if use_subprocess:
                      source = (f"__file__ = r'''{os.path.abspath(filename)}'''\n"
                                + source + "\ndel __file__")
          try:
              code = compile(source, filename, "exec")
          except (OverflowError, SyntaxError):
              self.tkconsole.resetoutput()
              print('*** Error in script or command!\n'
                   'Traceback (most recent call last):',
                    file=self.tkconsole.stderr)
              InteractiveInterpreter.showsyntaxerror(self, filename)
              self.tkconsole.showprompt()
          else:
              self.runcode(code)
function_tokens: def execfile ( self , filename , source = None ) : if source is None : with tokenize . open ( filename ) as fp : source = fp . read ( ) if use_subprocess : source = ( f"__file__ = r'''{os.path.abspath(filename)}'''\n" + source + "\ndel __file__" ) try : code = compile ( source , filename , "exec" ) except ( OverflowError , SyntaxError ) : self . tkconsole . resetoutput ( ) print ( '*** Error in script or command!\n' 'Traceback (most recent call last):' , file = self . tkconsole . stderr ) InteractiveInterpreter . showsyntaxerror ( self , filename ) self . tkconsole . showprompt ( ) else : self . runcode ( code )