def showtraceback(self, exc_tuple=None, filename=None, tb_offset=None, exception_only=False, running_compiled_code=False):
    "Display the exception that just occurred.\n\n        If nothing is known about the exception, this is the method which\n        should be used throughout the code for presenting user tracebacks,\n        rather than directly invoking the InteractiveTB object.\n\n        A specific showsyntaxerror() also exists, but this method can take\n        care of calling it if needed, so unless you are explicitly catching a\n        SyntaxError exception, don't try to analyze the stack manually and\n        simply call this method."
    try:
        try:
            (etype, value, tb) = self._get_exc_info(exc_tuple)
        except ValueError:
            print('No traceback available to show.', file=sys.stderr)
            return
        if issubclass(etype, SyntaxError):
            self.showsyntaxerror(filename, running_compiled_code)
        elif (etype is UsageError):
            self.show_usage_error(value)
        else:
            if exception_only:
                stb = ['An exception has occurred, use %tb to see the full traceback.\n']
                stb.extend(self.InteractiveTB.get_exception_only(etype, value))
            else:
                try:
                    if hasattr(value, '_render_traceback_'):
                        stb = value._render_traceback_()
                    else:
                        stb = self.InteractiveTB.structured_traceback(etype, value, tb, tb_offset=tb_offset)
                except Exception:
                    print('Unexpected exception formatting exception. Falling back to standard exception')
                    traceback.print_exc()
                    return None
                self._showtraceback(etype, value, stb)
                if self.call_pdb:
                    self.debugger(force=True)
                return
            self._showtraceback(etype, value, stb)
    except KeyboardInterrupt:
        print(('\n' + self.get_exception_only()), file=sys.stderr)
Display the exception that just occurred.

If nothing is known about the exception, this is the method which
should be used throughout the code for presenting user tracebacks,
rather than directly invoking the InteractiveTB object.

A specific showsyntaxerror() also exists, but this method can take
care of calling it if needed, so unless you are explicitly catching a
SyntaxError exception, don't try to analyze the stack manually and
simply call this method.
def showtraceback(self, exc_tuple=None, filename=None, tb_offset=None, exception_only=False, running_compiled_code=False):
    "Display the exception that just occurred.\n\n        If nothing is known about the exception, this is the method which\n        should be used throughout the code for presenting user tracebacks,\n        rather than directly invoking the InteractiveTB object.\n\n        A specific showsyntaxerror() also exists, but this method can take\n        care of calling it if needed, so unless you are explicitly catching a\n        SyntaxError exception, don't try to analyze the stack manually and\n        simply call this method."
    try:
        try:
            (etype, value, tb) = self._get_exc_info(exc_tuple)
        except ValueError:
            print('No traceback available to show.', file=sys.stderr)
            return
        if issubclass(etype, SyntaxError):
            self.showsyntaxerror(filename, running_compiled_code)
        elif (etype is UsageError):
            self.show_usage_error(value)
        else:
            if exception_only:
                stb = ['An exception has occurred, use %tb to see the full traceback.\n']
                stb.extend(self.InteractiveTB.get_exception_only(etype, value))
            else:
                try:
                    if hasattr(value, '_render_traceback_'):
                        stb = value._render_traceback_()
                    else:
                        stb = self.InteractiveTB.structured_traceback(etype, value, tb, tb_offset=tb_offset)
                except Exception:
                    print('Unexpected exception formatting exception. Falling back to standard exception')
                    traceback.print_exc()
                    return None
                self._showtraceback(etype, value, stb)
                if self.call_pdb:
                    self.debugger(force=True)
                return
            self._showtraceback(etype, value, stb)
    except KeyboardInterrupt:
        print(('\n' + self.get_exception_only()), file=sys.stderr)