cpython/Demo/tkinter/guido/imageview.py

13 lines
205 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()
img = PhotoImage(file=filename)
1995-09-07 19:45:52 +00:00
label = Label(root, image=img)
1995-09-07 19:42:57 +00:00
label.pack()
root.mainloop()
main()