# example_004.py from tkinter import Tk, Image def main(): root = Tk() icon = Image('photo', file='icon.png') root.wm_iconphoto(True, icon) root.mainloop() if __name__ == '__main__': main()