summaryrefslogtreecommitdiffstats
path: root/Demo/tkinter/guido/listtree.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-30 18:57:18 (GMT)
committerGuido van Rossum <guido@python.org>1996-07-30 18:57:18 (GMT)
commit89cb67bb642ee958d9f095728c99e943e994ca54 (patch)
tree24f176f21636ab7b3a5cd1cec9948b4e3a1315ff /Demo/tkinter/guido/listtree.py
parentc30e95f4b0fa266df678fe4e307ff6c19a3f9e73 (diff)
downloadcpython-89cb67bb642ee958d9f095728c99e943e994ca54.zip
cpython-89cb67bb642ee958d9f095728c99e943e994ca54.tar.gz
cpython-89cb67bb642ee958d9f095728c99e943e994ca54.tar.bz2
Updated for Python 1.4
Diffstat (limited to 'Demo/tkinter/guido/listtree.py')
-rwxr-xr-xDemo/tkinter/guido/listtree.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Demo/tkinter/guido/listtree.py b/Demo/tkinter/guido/listtree.py
index c5e3bc5..523f209 100755
--- a/Demo/tkinter/guido/listtree.py
+++ b/Demo/tkinter/guido/listtree.py
@@ -6,16 +6,16 @@ import string
from Tkinter import *
def listtree(master, app):
- list = Listbox(master, {'name': 'list',
- Pack: {'expand': 1, 'fill': 'both'}})
+ 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))
+## 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:
@@ -28,7 +28,8 @@ def main():
app = sys.argv[1]
tk = Tk()
tk.minsize(1, 1)
- f = Frame(tk, {'name': 'f', Pack: {'expand': 1, 'fill': 'both'}})
+ f = Frame(tk, name='f')
+ f.pack(expand=1, fill=BOTH)
list = listtree(f, app)
tk.mainloop()