cpython/Demo/tkinter/guido/imageview.py

14 lines
219 B
Python
Raw Normal View History

1995-09-07 19:42:57 +00:00
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()