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

IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
This commit is contained in:
Terry Jan Reedy 2021-09-28 08:05:56 -04:00 committed by GitHub
parent a47d67cf46
commit e649e0658f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View file

@ -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."""