summaryrefslogtreecommitdiff
path: root/Lib/idlelib/ObjectBrowser.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2001-07-13 17:57:37 +0000
committerKurt B. Kaiser <kbk@shore.net>2001-07-13 17:57:37 +0000
commit57df8cc81350331a0e60f4c1b1480d108f44be0f (patch)
tree41fd9a5a467d6d34672b1e5f3fba4d65703a371b /Lib/idlelib/ObjectBrowser.py
parent0a0d204a1515c76d4657cb4b0106af72a1f8dc32 (diff)
downloadcpython-57df8cc81350331a0e60f4c1b1480d108f44be0f.tar.gz
py-cvs-rel2_1 (Rev 1.3) merge
"Make the test program work outside IDLE." -- GvR
Diffstat (limited to 'Lib/idlelib/ObjectBrowser.py')
-rw-r--r--Lib/idlelib/ObjectBrowser.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/idlelib/ObjectBrowser.py b/Lib/idlelib/ObjectBrowser.py
index 94b59d67f0..c235a7564f 100644
--- a/Lib/idlelib/ObjectBrowser.py
+++ b/Lib/idlelib/ObjectBrowser.py
@@ -134,18 +134,18 @@ def make_objecttreeitem(labeltext, object, setfunction=None):
# Test script
-def test():
+def _test():
import sys
- from Tkinter import Toplevel
- import PyShell
- root = Toplevel(PyShell.root)
+ from Tkinter import Tk
+ root = Tk()
root.configure(bd=0, bg="yellow")
root.focus_set()
sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
sc.frame.pack(expand=1, fill="both")
item = make_objecttreeitem("sys", sys)
node = TreeNode(sc.canvas, None, item)
- node.expand()
+ node.update()
+ root.mainloop()
if __name__ == '__main__':
- test()
+ _test()