From e3f90b217a5152275b180b466bd503658a734462 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 26 Oct 2019 21:15:10 -0400 Subject: [PATCH] bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939) --- Lib/idlelib/runscript.py | 7 +++++++ .../next/IDLE/2019-10-26-18-16-24.bpo-38598.6kH9FY.rst | 1 + 2 files changed, 8 insertions(+) create mode 100644 Misc/NEWS.d/next/IDLE/2019-10-26-18-16-24.bpo-38598.6kH9FY.rst diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index e99d0d2e027..a54108794ab 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('<>', 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' diff --git a/Misc/NEWS.d/next/IDLE/2019-10-26-18-16-24.bpo-38598.6kH9FY.rst b/Misc/NEWS.d/next/IDLE/2019-10-26-18-16-24.bpo-38598.6kH9FY.rst new file mode 100644 index 00000000000..5d04e4a79b6 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-10-26-18-16-24.bpo-38598.6kH9FY.rst @@ -0,0 +1 @@ +Do not try to compile IDLE shell or output windows