'Override base class method'

def runcode(self, code):

    if self.tkconsole.executing:
        self.interp.restart_subprocess()
    self.checklinecache()
    if (self.save_warnings_filters is not None):
        warnings.filters[:] = self.save_warnings_filters
        self.save_warnings_filters = None
    debugger = self.debugger
    try:
        self.tkconsole.beginexecuting()
        if ((not debugger) and (self.rpcclt is not None)):
            self.active_seq = self.rpcclt.asyncqueue('exec', 'runcode', (code,), {})
        elif debugger:
            debugger.run(code, self.locals)
        else:
            exec code in self.locals
    except SystemExit:
        if (not self.tkconsole.closing):
            if tkMessageBox.askyesno('Exit?', 'Do    you    want    to    exit    altogether?', default='yes', master=self.tkconsole.text):
                raise
            else:
                self.showtraceback()
        else:
            raise
    except:
        if use_subprocess:
            print >>self.tkconsole.stderr, 'IDLE    internal    error    in    runcode()'
            self.showtraceback()
            self.tkconsole.endexecuting()
        elif self.tkconsole.canceled:
            self.tkconsole.canceled = False
            print >>self.tkconsole.stderr, 'KeyboardInterrupt'
        else:
            self.showtraceback()
    finally:
        if (not use_subprocess):
            try:
                self.tkconsole.endexecuting()
            except AttributeError:
                pass
