From: Terry Jan Reedy Date: Mon, 18 May 2015 19:37:37 +0000 (-0400) Subject: Issue #24222: Fix regression introduced with idlelib/PyShell.py future print X-Git-Tag: v2.7.11rc1~302^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23120090f5efe2627ecb56384d5f117893d748a5;p=thirdparty%2FPython%2Fcpython.git Issue #24222: Fix regression introduced with idlelib/PyShell.py future print import. Idle -c "code", -r file.py again compile with print statement. --- diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 8ee0c0e7466e..eec59789eee6 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'