cpython/Demo/tkinter/guido/imageview.py

14 lines
219 B
Python
Executable File

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()