Hi,
I'm using Python3, Tkinter.. from the repository (as of today since it didn't come preinstalled) and I immediately headed off for a tutorial. Here's the program.
Bearing in mind that the icon is in the same folder as the script...Code:import tkinter window = tkinter.Tk() window.title("Gaia") window.geometry("600x480") window.wm_iconbitmap('Orb.xbm') window.mainloop()
Now if I put an "@" in front of the file name I get...Code:Traceback (most recent call last): File "Gaia/init.py", line 16, in <module> window.wm_iconbitmap('Orb.xbm') File "/usr/lib/python3.3/tkinter/__init__.py", line 1637, in wm_iconbitmap return self.tk.call('wm', 'iconbitmap', self._w, bitmap) _tkinter.TclError: bitmap "Orb.xbm" not defined
However the file opens up just fine with Gimp and I would really like a colour version.Code:Traceback (most recent call last): File "Gaia/init.py", line 16, in <module> window.wm_iconbitmap('@Orb.xbm') File "/usr/lib/python3.3/tkinter/__init__.py", line 1637, in wm_iconbitmap return self.tk.call('wm', 'iconbitmap', self._w, bitmap) _tkinter.TclError: error reading bitmap file "Orb.xbm"
I also get the same problem with the Orb.xmp, Orb.ico Orb.gif Orb.png
Any suggestions would be greatly appreciated.


Reply With Quote

