cpython/Demo/tkinter/guido/imageview.py

13 lines
205 B
Python
Raw Normal View History

1995-09-07 16:42:57 -03:00
from Tkinter import *
import sys
def main():
filename = sys.argv[1]
root = Tk()
img = PhotoImage(file=filename)
1995-09-07 16:45:52 -03:00
label = Label(root, image=img)
1995-09-07 16:42:57 -03:00
label.pack()
root.mainloop()
main()