From 23120090f5efe2627ecb56384d5f117893d748a5 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 18 May 2015 15:37:37 -0400 Subject: [PATCH] Issue #24222: Fix regression introduced with idlelib/PyShell.py future print import. Idle -c "code", -r file.py again compile with print statement. --- Lib/idlelib/PyShell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 8ee0c0e746..eec59789ee 100755 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -652,7 +652,7 @@ class ModifiedInterpreter(InteractiveInterpreter): if source is None: source = open(filename, "r").read() try: - code = compile(source, filename, "exec") + code = compile(source, filename, "exec", dont_inherit=True) except (OverflowError, SyntaxError): self.tkconsole.resetoutput() print('*** Error in script or command!\n' -- 2.50.1