cpython/Demo/tkinter/guido/imageview.py

13 lines
205 B
Python

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