else/Logogame/test.py

19 lines
281 B
Python
Raw Normal View History

import tkinter
from PIL import Image
from PIL import ImageTk
t=tkinter.Tk()
2015-03-15 06:28:17 +00:00
def png(filename):
im = Image.open('images/%s.png' % filename)
im = ImageTk.PhotoImage(im)
return im
2015-03-15 06:28:17 +00:00
im = png('jarate')
l = tkinter.Label(t, text="heyo", image=im)
l.im = im
l.pack()
t.mainloop()