/Demo/tkinter/guido/imageview.py
http://unladen-swallow.googlecode.com/ · Python · 12 lines · 10 code · 2 blank · 0 comment · 0 complexity · 5ac49057e0d160ff9a74a08db404b495 MD5 · raw file
- from Tkinter import *
- import sys
- def main():
- filename = sys.argv[1]
- root = Tk()
- img = PhotoImage(file=filename)
- label = Label(root, image=img)
- label.pack()
- root.mainloop()
- main()