summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-05-18 19:37:37 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-05-18 19:37:37 (GMT)
commit23120090f5efe2627ecb56384d5f117893d748a5 (patch)
treea43e7c41fb18d6d05321f598749eb7e3cfd3459f /Lib/idlelib/PyShell.py
parent25598f35d73985d29b4300f17b5b148332334a04 (diff)
downloadcpython-23120090f5efe2627ecb56384d5f117893d748a5.zip
cpython-23120090f5efe2627ecb56384d5f117893d748a5.tar.gz
cpython-23120090f5efe2627ecb56384d5f117893d748a5.tar.bz2
Issue #24222: Fix regression introduced with idlelib/PyShell.py future print
import. Idle -c "code", -r file.py again compile with print statement.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rwxr-xr-xLib/idlelib/PyShell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 8ee0c0e..eec5978 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'