#!/usr/bin/env python2 # -*- coding: utf-8 -*- from Tkinter import * from PIL import Image, ImageTk app = Tk() app.title('APP title') app.iconname('APP') # Open PNG icon images using PIL imageL = Image.open("icon256.png") imageS = Image.open("icon48.png") # Make Tk PhotoImages and store them as properties in app # to prevent Python garbage collector to delete them app.iconL = ImageTk.PhotoImage(imageL) app.iconS = ImageTk.PhotoImage(imageS) # Add the images as default icons for app app.tk.call('wm', 'iconphoto', app._w, '-default', app.iconL, app.iconS) #print str(app) #print app.keys() #print app.configure() app.mainloop()