summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyshell.py
diff options
context:
space:
mode:
authorTal Einat <taleinat+github@gmail.com>2019-01-13 15:01:50 (GMT)
committerGitHub <noreply@github.com>2019-01-13 15:01:50 (GMT)
commit39a33e99270848d34628cdbb1fdb727f9ede502a (patch)
tree37e17a396741a0a98790b2bbcd6a24e2e730adca /Lib/idlelib/pyshell.py
parent995d9b92979768125ced4da3a56f755bcdf80f6e (diff)
downloadcpython-39a33e99270848d34628cdbb1fdb727f9ede502a.zip
cpython-39a33e99270848d34628cdbb1fdb727f9ede502a.tar.gz
cpython-39a33e99270848d34628cdbb1fdb727f9ede502a.tar.bz2
bpo-35196: Optimize Squeezer's write() interception (GH-10454)
The new functionality of Squeezer.reload() is also tested, along with some general re-working of the tests in test_squeezer.py.
Diffstat (limited to 'Lib/idlelib/pyshell.py')
-rwxr-xr-xLib/idlelib/pyshell.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py
index b6172fd..ea49aff 100755
--- a/Lib/idlelib/pyshell.py
+++ b/Lib/idlelib/pyshell.py
@@ -899,6 +899,9 @@ class PyShell(OutputWindow):
if use_subprocess:
text.bind("<<view-restart>>", self.view_restart_mark)
text.bind("<<restart-shell>>", self.restart_shell)
+ squeezer = self.Squeezer(self)
+ text.bind("<<squeeze-current-text>>",
+ squeezer.squeeze_current_text_event)
self.save_stdout = sys.stdout
self.save_stderr = sys.stderr