MCPcopy Index your code
hub / github.com/ipython/ipython / interaction

Method interaction

IPython/core/debugger.py:555–568  ·  view source on GitHub ↗
(self, frame, tb_or_exc)

Source from the content-addressed store, hash-verified

553 self.message("--KeyboardInterrupt--")
554
555 def interaction(self, frame, tb_or_exc):
556 try:
557 if CHAIN_EXCEPTIONS:
558 # this context manager is part of interaction in 3.13
559 _chained_exceptions, tb = self._get_tb_and_exceptions(tb_or_exc)
560 if isinstance(tb_or_exc, BaseException):
561 assert tb is not None, "main exception must have a traceback"
562 with self._hold_exceptions(_chained_exceptions):
563 OldPdb.interaction(self, frame, tb)
564 else:
565 OldPdb.interaction(self, frame, tb_or_exc)
566
567 except KeyboardInterrupt:
568 self.stdout.write("\n" + self.shell.get_exception_only())
569
570 def precmd(self, line):
571 """Perform useful escapes on the command before it is executed."""

Callers 1

debuggerMethod · 0.80

Calls 4

_hold_exceptionsMethod · 0.95
writeMethod · 0.45
get_exception_onlyMethod · 0.45

Tested by

no test coverage detected