Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions Lib/idlelib/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@

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."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On Windows, change exit/quit message to suggest Ctrl-D, which works, instead
of <Ctrl-Z Return>, which does not work in IDLE.