summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-09-07 19:45:52 (GMT)
committerGuido van Rossum <guido@python.org>1995-09-07 19:45:52 (GMT)
commitbbf817557f5a7d1e1927db046a1599552df74400 (patch)
tree82f544a087cbfd81c82c201fa64145e2f1e5e574 /Demo
parent55618efad934b1b47cc5fdcf0cc58ca8778d0c6a (diff)
downloadcpython-bbf817557f5a7d1e1927db046a1599552df74400.zip
cpython-bbf817557f5a7d1e1927db046a1599552df74400.tar.gz
cpython-bbf817557f5a7d1e1927db046a1599552df74400.tar.bz2
simplified no Tk() sets _default_root
Diffstat (limited to 'Demo')
-rwxr-xr-xDemo/tkinter/guido/imageview.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Demo/tkinter/guido/imageview.py b/Demo/tkinter/guido/imageview.py
index 541c96a..d6efed0 100755
--- a/Demo/tkinter/guido/imageview.py
+++ b/Demo/tkinter/guido/imageview.py
@@ -4,9 +4,8 @@ import sys
def main():
filename = sys.argv[1]
root = Tk()
- label = Label(root)
img = PhotoImage(file=filename)
- label['image'] = img
+ label = Label(root, image=img)
label.pack()
root.mainloop()