summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2019-10-27 01:41:26 (GMT)
committerGitHub <noreply@github.com>2019-10-27 01:41:26 (GMT)
commite3a477aa072a737d5119b0778d14d9f3ddb9f587 (patch)
tree79f3feb955deb52356f3c93d9e169c4c72e32da3 /Lib
parent11f0f11c4859f5ca201cd40b379b13c65f05ec91 (diff)
downloadcpython-e3a477aa072a737d5119b0778d14d9f3ddb9f587.zip
cpython-e3a477aa072a737d5119b0778d14d9f3ddb9f587.tar.gz
cpython-e3a477aa072a737d5119b0778d14d9f3ddb9f587.tar.bz2
bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939)
(cherry picked from commit e3f90b217a5152275b180b466bd503658a734462) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/runscript.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py
index e99d0d2..a541087 100644
--- a/Lib/idlelib/runscript.py
+++ b/Lib/idlelib/runscript.py
@@ -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'