MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / _raise_keyboard_interrupt

Method _raise_keyboard_interrupt

cmd2/cmd2.py:2812–2815  ·  view source on GitHub ↗

Raise a KeyboardInterrupt.

(self)

Source from the content-addressed store, hash-verified

2810 sys.exit(128 + signum)
2811
2812 def _raise_keyboard_interrupt(self) -> None:
2813 """Raise a KeyboardInterrupt."""
2814 self.poutput() # Ensure new prompt is on a line by itself
2815 raise KeyboardInterrupt("Got a keyboard interrupt")
2816
2817 def pre_prompt(self) -> None:
2818 """Ran just before the prompt is displayed (and after the event loop has started).

Callers 3

sigint_handlerMethod · 0.95
do_shellMethod · 0.95

Calls 1

poutputMethod · 0.95

Tested by 1