summaryrefslogtreecommitdiffstats
path: root/Lib/_pyrepl/commands.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2024-05-31 20:26:02 (GMT)
committerGitHub <noreply@github.com>2024-05-31 20:26:02 (GMT)
commit2237946af0981c46dc7d3886477e425ccfb37f28 (patch)
tree55317ee5d19a7bcba247052de2d0de660ebcb724 /Lib/_pyrepl/commands.py
parentf9d47fed9fbbe9313404838050f6dfe1c7fe6340 (diff)
downloadcpython-2237946af0981c46dc7d3886477e425ccfb37f28.zip
cpython-2237946af0981c46dc7d3886477e425ccfb37f28.tar.gz
cpython-2237946af0981c46dc7d3886477e425ccfb37f28.tar.bz2
gh-118894: Make asyncio REPL use pyrepl (GH-119433)
Diffstat (limited to 'Lib/_pyrepl/commands.py')
-rw-r--r--Lib/_pyrepl/commands.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/_pyrepl/commands.py b/Lib/_pyrepl/commands.py
index ed977f8..2ef5dad 100644
--- a/Lib/_pyrepl/commands.py
+++ b/Lib/_pyrepl/commands.py
@@ -219,6 +219,11 @@ class interrupt(FinishCommand):
os.kill(os.getpid(), signal.SIGINT)
+class ctrl_c(Command):
+ def do(self) -> None:
+ raise KeyboardInterrupt
+
+
class suspend(Command):
def do(self) -> None:
import signal