Hi, I'm trying to add an icon to my Tkinter GUI window and have had no luck. After some searching, I came up with the same piece of code which does not work.
Here is a snippet of my code:
from Tkinter import *
root = Tk()
root.minsize(290, 700)
root.title("My Window")
root.wm_iconbitmap('MyIcon.ico')
root.mainloop()
The traceback:
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1525, in wm_iconbitmap
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "MyIcon.ico" not defined
What can I do to change that danged icon?
Thanks in advance.