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

Method __init__

Lib/idlelib/debugger.py:511–536  ·  view source on GitHub ↗
(self, master, title, odict=None)

Source from the content-addressed store, hash-verified

509 "Global/local namespace viewer for debugger GUI."
510
511 def __init__(self, master, title, odict=None): # XXX odict never passed.
512 width = 0
513 height = 40
514 if odict:
515 height = 20*len(odict) # XXX 20 == observed height of Entry widget
516 self.master = master
517 self.title = title
518 import reprlib
519 self.repr = reprlib.Repr()
520 self.repr.maxstring = 60
521 self.repr.maxother = 60
522 self.frame = frame = Frame(master)
523 self.frame.pack(expand=1, fill="both")
524 self.label = Label(frame, text=title, borderwidth=2, relief="groove")
525 self.label.pack(fill="x")
526 self.vbar = vbar = Scrollbar(frame, name="vbar")
527 vbar.pack(side="right", fill="y")
528 self.canvas = canvas = Canvas(frame,
529 height=min(300, max(40, height)),
530 scrollregion=(0, 0, width, height))
531 canvas.pack(side="left", fill="both", expand=1)
532 vbar["command"] = canvas.yview
533 canvas["yscrollcommand"] = vbar.set
534 self.subframe = subframe = Frame(canvas)
535 self.sfid = canvas.create_window(0, 0, window=subframe, anchor="nw")
536 self.load_dict(odict)
537
538 prev_odict = -1 # Needed for initial comparison below.
539

Callers

nothing calls this directly

Calls 7

create_windowMethod · 0.95
load_dictMethod · 0.95
FrameClass · 0.90
ScrollbarClass · 0.90
CanvasClass · 0.85
LabelClass · 0.50
packMethod · 0.45

Tested by

no test coverage detected