| 348 | (expr, newvalue, oldvalue)) |
| 349 | |
| 350 | def interaction(self, frame, traceback): |
| 351 | # Restore the previous signal handler at the Pdb prompt. |
| 352 | if Pdb._previous_sigint_handler: |
| 353 | try: |
| 354 | signal.signal(signal.SIGINT, Pdb._previous_sigint_handler) |
| 355 | except ValueError: # ValueError: signal only works in main thread |
| 356 | pass |
| 357 | else: |
| 358 | Pdb._previous_sigint_handler = None |
| 359 | if self.setup(frame, traceback): |
| 360 | # no interaction desired at this time (happens if .pdbrc contains |
| 361 | # a command like "continue") |
| 362 | self.forget() |
| 363 | return |
| 364 | self.print_stack_entry(self.stack[self.curindex]) |
| 365 | self._cmdloop() |
| 366 | self.forget() |
| 367 | |
| 368 | def displayhook(self, obj): |
| 369 | """Custom displayhook for the exec in default(), which prevents |