Skip to content

[3.8] bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939) #16942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2019
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/runscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from idlelib import macosx
from idlelib import pyshell
from idlelib.query import CustomRun
from idlelib import outwin

indent_message = """Error: Inconsistent indentation detected!

Expand Down Expand Up @@ -46,6 +47,9 @@ def __init__(self, editwin):
self.editwin.text_frame.bind('<<run-module-event-2>>', self._run_module_event)

def check_module_event(self, event):
if isinstance(self.editwin, outwin.OutputWindow):
self.editwin.text.bell()
return 'break'
filename = self.getfilename()
if not filename:
return 'break'
Expand Down Expand Up @@ -129,6 +133,9 @@ def _run_module_event(self, event, *, customize=False):
module being executed and also add that directory to its
sys.path if not already included.
"""
if isinstance(self.editwin, outwin.OutputWindow):
self.editwin.text.bell()
return 'break'
filename = self.getfilename()
if not filename:
return 'break'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not try to compile IDLE shell or output windows