summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Demo/tkinter/guido/listtree.py
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 15:16:20 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 15:16:20 +0000
commit5976fdfe42ecdee07df0621d9323c2790b23eb5d (patch)
treee399aa4b8bb7c6d5d2eb8267cf9a2904370a046a /sys/src/cmd/python/Demo/tkinter/guido/listtree.py
parent1665b57e14f8637569e52f8752cc9dd1672a5cfb (diff)
remove stuff
Diffstat (limited to 'sys/src/cmd/python/Demo/tkinter/guido/listtree.py')
-rwxr-xr-xsys/src/cmd/python/Demo/tkinter/guido/listtree.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/sys/src/cmd/python/Demo/tkinter/guido/listtree.py b/sys/src/cmd/python/Demo/tkinter/guido/listtree.py
deleted file mode 100755
index d28ce49ef..000000000
--- a/sys/src/cmd/python/Demo/tkinter/guido/listtree.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# List a remote app's widget tree (names and classes only)
-
-import sys
-import string
-
-from Tkinter import *
-
-def listtree(master, app):
- list = Listbox(master, name='list')
- list.pack(expand=1, fill=BOTH)
- listnodes(list, app, '.', 0)
- return list
-
-def listnodes(list, app, widget, level):
- klass = list.send(app, 'winfo', 'class', widget)
-## i = string.rindex(widget, '.')
-## list.insert(END, '%s%s (%s)' % ((level-1)*'. ', widget[i:], klass))
- list.insert(END, '%s (%s)' % (widget, klass))
- children = list.tk.splitlist(
- list.send(app, 'winfo', 'children', widget))
- for c in children:
- listnodes(list, app, c, level+1)
-
-def main():
- if not sys.argv[1:]:
- sys.stderr.write('Usage: listtree appname\n')
- sys.exit(2)
- app = sys.argv[1]
- tk = Tk()
- tk.minsize(1, 1)
- f = Frame(tk, name='f')
- f.pack(expand=1, fill=BOTH)
- list = listtree(f, app)
- tk.mainloop()
-
-if __name__ == '__main__':
- main()