bpo-45296: Fix exit/quit message on Windows (GH-28577) (GH-28601)

IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
(cherry picked from commit e649e0658f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2021-09-28 05:35:04 -07:00 committed by GitHub
parent 94d19f606f
commit 813fbba4ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View file

@ -60,6 +60,13 @@
HOST = '127.0.0.1' # python execution server on localhost loopback
PORT = 0 # someday pass in host, port for remote debug capability
try: # In case IDLE started with -n.
eof = 'Ctrl-D (end-of-file)'
exit.eof = eof
quit.eof = eof
except NameError: # In case python started with -S.
pass
# Override warnings module to write to warning_stream. Initialize to send IDLE
# internal warnings to the console. ScriptBinding.check_syntax() will
# temporarily redirect the stream to the shell window to display warnings when