MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/idlelib/sidebar.py:406–422  ·  view source on GitHub ↗
(self, editwin)

Source from the content-addressed store, hash-verified

404class ShellSidebar(BaseSideBar):
405 """Sidebar for the PyShell window, for prompts etc."""
406 def __init__(self, editwin):
407 self.canvas = None
408 self.line_prompts = {}
409
410 super().__init__(editwin)
411
412 change_delegator = \
413 WrappedLineHeightChangeDelegator(self.change_callback)
414 # Insert the TextChangeDelegator after the last delegator, so that
415 # the sidebar reflects final changes to the text widget contents.
416 d = self.editwin.per.top
417 if d.delegate is not self.text:
418 while d.delegate is not self.editwin.per.bottom:
419 d = d.delegate
420 self.editwin.per.insertfilterafter(change_delegator, after=d)
421
422 self.is_shown = True
423
424 def init_widgets(self):
425 self.canvas = tk.Canvas(self.parent, width=30,

Callers

nothing calls this directly

Calls 4

superClass · 0.85
insertfilterafterMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected