bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939)

(cherry picked from commit e3f90b217a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Skeleton (bot) 2019-10-26 18:41:26 -07:00 committed by GitHub
parent 11f0f11c48
commit e3a477aa07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@ from idlelib.config import idleConf
from idlelib import macosx
from idlelib import pyshell
from idlelib.query import CustomRun
from idlelib import outwin
indent_message = """Error: Inconsistent indentation detected!
@ -46,6 +47,9 @@ class ScriptBinding:
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'
@ -129,6 +133,9 @@ class ScriptBinding:
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'

View File

@ -0,0 +1 @@
Do not try to compile IDLE shell or output windows