class_docstr: Global/local namespace viewer for debugger GUI.
code: def __init__(self, master, title, dict=None):
      width = 0
      height = 40
      if dict:
          height = 20 * len(
              dict
          )  # XXX 20 == observed height of Entry widget
      self.master = master
      self.title = title
      import reprlib
  
      self.repr = reprlib.Repr()
      self.repr.maxstring = 60
      self.repr.maxother = 60
      self.frame = frame = Frame(master)
      self.frame.pack(expand=1, fill="both")
      self.label = Label(
          frame, text=title, borderwidth=2, relief="groove"
      )
      self.label.pack(fill="x")
      self.vbar = vbar = Scrollbar(frame, name="vbar")
      vbar.pack(side="right", fill="y")
      self.canvas = canvas = Canvas(
          frame,
          height=min(300, max(40, height)),
          scrollregion=(0, 0, width, height),
      )
      canvas.pack(side="left", fill="both", expand=1)
      vbar["command"] = canvas.yview
      canvas["yscrollcommand"] = vbar.set
      self.subframe = subframe = Frame(canvas)
      self.sfid = canvas.create_window(
          0, 0, window=subframe, anchor="nw"
      )
      self.load_dict(dict)
  
imports: import bdb
  import os
  from tkinter import *
  from tkinter.ttk import Frame, Scrollbar
  from idlelib import macosx
  from idlelib.scrolledlist import ScrolledList
  from idlelib.window import ListedToplevel
label_desc: Use image node_id 1 to create a new NamespaceViewer object  with example: obj = NamespaceViewer(master, title, dict)