diff options
author | Tal Einat <taleinat+github@gmail.com> | 2018-09-25 15:10:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 15:10:14 +0300 |
commit | 604e7b9931f9e7881a2941816e538f5f15930db8 (patch) | |
tree | 393ac360f1d76ab0afc2621c76d6b998e9813c60 /Lib/idlelib/editor.py | |
parent | 5b3cbcd4a041eeda935dd6d0c75f2d38111ed03d (diff) | |
download | cpython-git-604e7b9931f9e7881a2941816e538f5f15930db8.tar.gz |
bpo-1529353: IDLE: squeeze large output in the shell (GH-7626)
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r-- | Lib/idlelib/editor.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 227a74deb8..6689af64c4 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -2,9 +2,7 @@ import importlib.abc import importlib.util import os import platform -import re import string -import sys import tokenize import traceback import webbrowser @@ -50,7 +48,6 @@ class EditorWindow(object): from idlelib.undo import UndoDelegator from idlelib.iomenu import IOBinding, encoding from idlelib import mainmenu - from tkinter import Toplevel, EventType from idlelib.statusbar import MultiStatusBar from idlelib.autocomplete import AutoComplete from idlelib.autoexpand import AutoExpand @@ -59,6 +56,7 @@ class EditorWindow(object): from idlelib.paragraph import FormatParagraph from idlelib.parenmatch import ParenMatch from idlelib.rstrip import Rstrip + from idlelib.squeezer import Squeezer from idlelib.zoomheight import ZoomHeight filesystemencoding = sys.getfilesystemencoding() # for file names @@ -319,6 +317,9 @@ class EditorWindow(object): text.bind("<<zoom-height>>", self.ZoomHeight(self).zoom_height_event) text.bind("<<toggle-code-context>>", self.CodeContext(self).toggle_code_context_event) + squeezer = self.Squeezer(self) + text.bind("<<squeeze-current-text>>", + squeezer.squeeze_current_text_event) def _filename_to_unicode(self, filename): """Return filename as BMP unicode so diplayable in Tk.""" |