diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2001-07-13 17:57:37 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2001-07-13 17:57:37 (GMT) |
commit | 6a945a590400c3d78cb73af840217c76f65cc471 (patch) | |
tree | 24f7351b84d306057dca4328421ad7d9bd3fba39 | |
parent | 8220fdda75d7413b07bbed17670e35616cfd678f (diff) | |
download | cpython-6a945a590400c3d78cb73af840217c76f65cc471.zip cpython-6a945a590400c3d78cb73af840217c76f65cc471.tar.gz cpython-6a945a590400c3d78cb73af840217c76f65cc471.tar.bz2 |
py-cvs-rel2_1 (Rev 1.3) merge
"Make the test program work outside IDLE." -- GvR
-rw-r--r-- | Lib/idlelib/ObjectBrowser.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/idlelib/ObjectBrowser.py b/Lib/idlelib/ObjectBrowser.py index 94b59d6..c235a75 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() |