summaryrefslogtreecommitdiffstats
path: root/Tools/idle/ObjectBrowser.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-02 21:22:03 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-02 21:22:03 (GMT)
commitef92edd9036fd446cf5d51fbd8342957dcc3cf60 (patch)
treeac39b39e16048248e0b83e7e6938c47b16ce1924 /Tools/idle/ObjectBrowser.py
parent6d0cee117004ab01b6b6945e8f0fa33b75041723 (diff)
downloadcpython-ef92edd9036fd446cf5d51fbd8342957dcc3cf60.zip
cpython-ef92edd9036fd446cf5d51fbd8342957dcc3cf60.tar.gz
cpython-ef92edd9036fd446cf5d51fbd8342957dcc3cf60.tar.bz2
Make the test program work outside IDLE.
Diffstat (limited to 'Tools/idle/ObjectBrowser.py')
-rw-r--r--Tools/idle/ObjectBrowser.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/idle/ObjectBrowser.py b/Tools/idle/ObjectBrowser.py
index 94b59d6..c235a75 100644
--- a/Tools/idle/ObjectBrowser.py
+++ b/Tools/idle/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()