diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2015-08-18 17:26:45 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2015-08-18 17:26:45 (GMT) |
commit | 864e1a6415bbd9044f8081c4107221ed390c5465 (patch) | |
tree | 9bb0ecb0f7a7bbd48904885068d42f1f914603c9 | |
parent | c9a5a19e818c9cbbdcf5769d18aca092fb227325 (diff) | |
download | cpython-864e1a6415bbd9044f8081c4107221ed390c5465.zip cpython-864e1a6415bbd9044f8081c4107221ed390c5465.tar.gz cpython-864e1a6415bbd9044f8081c4107221ed390c5465.tar.bz2 |
Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
-rw-r--r-- | Lib/idlelib/StackViewer.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/idlelib/StackViewer.py b/Lib/idlelib/StackViewer.py index ccf6283..542c0df 100644 --- a/Lib/idlelib/StackViewer.py +++ b/Lib/idlelib/StackViewer.py @@ -10,8 +10,7 @@ from idlelib.PyShell import PyShellFileList def StackBrowser(root, flist=None, tb=None, top=None): if top is None: - from Tkinter import Toplevel - top = Toplevel(root) + top = tk.Toplevel(root) sc = ScrolledCanvas(top, bg="white", highlightthickness=0) sc.frame.pack(expand=1, fill="both") item = StackTreeItem(flist, tb) @@ -108,12 +107,9 @@ class VariablesTreeItem(ObjectTreeItem): def IsExpandable(self): return len(self.object) > 0 - def keys(self): - return self.object.keys() - def GetSubList(self): sublist = [] - for key in self.keys(): + for key in self.object.keys(): try: value = self.object[key] except KeyError: @@ -124,7 +120,7 @@ class VariablesTreeItem(ObjectTreeItem): sublist.append(item) return sublist -def _stack_viewer(parent): +def _stack_viewer(parent): # htest # root = tk.Tk() root.title("Test StackViewer") width, height, x, y = list(map(int, re.split('[x+]', parent.geometry()))) |