summaryrefslogtreecommitdiffstats
path: root/Demo/tkinter/guido/imageview.py
blob: 541c96adeab33bb0748edf80a5c9a4a2e41b530f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from Tkinter import *
import sys

def main():
    filename = sys.argv[1]
    root = Tk()
    label = Label(root)
    img = PhotoImage(file=filename)
    label['image'] = img
    label.pack()
    root.mainloop()

main()