Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import Tk
- root = Tk()
- #some other codes here which you don't really need to care about
- root.iconbitmap(r'icon.ico') #<--- this statement will be adding the icon
- root.mainloop()
- --------------------------------error----
- Traceback (most recent call last):
- File "file.py", line 12, in <module>
- root.iconbitmap(r'icon.ico')
- File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1701, in wm_iconbitmap
- return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
- _tkinter.TclError: bitmap "icon.ico" not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement