diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2021-09-28 12:05:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 12:05:56 (GMT) |
commit | e649e0658ff2af87b07d994c05ae048e16e31aae (patch) | |
tree | 12a9c2cbe89c4ff2789dc92f3aaaa3568a486e88 /Lib/idlelib/run.py | |
parent | a47d67cf46626d8dbd66a81ee7b5f1568afc0521 (diff) | |
download | cpython-e649e0658ff2af87b07d994c05ae048e16e31aae.zip cpython-e649e0658ff2af87b07d994c05ae048e16e31aae.tar.gz cpython-e649e0658ff2af87b07d994c05ae048e16e31aae.tar.bz2 |
bpo-45296: Fix exit/quit message on Windows (GH-28577)
IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r-- | Lib/idlelib/run.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 3836727..47c4cbd 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -40,6 +40,13 @@ if not hasattr(sys.modules['idlelib.run'], 'firstrun'): LOCALHOST = '127.0.0.1' +try: + eof = 'Ctrl-D (end-of-file)' + exit.eof = eof + quit.eof = eof +except NameError: # In case subprocess started with -S (maybe in future). + pass + def idle_formatwarning(message, category, filename, lineno, line=None): """Format warnings the IDLE way.""" |