Is python2.5's Tix wrapper broken?

R

Ron Provost

I have a piece of software I wrote some time ago using Python and the Tix
wrapper. I just upgraded to Python 2.5 and to my surprise my software no
longer functions. There's a problem with the Tix wrapper. Under a clean
install of Python the following should display an empty root window on the
screen and happily.

Under Python2.5, the empty root window is displayed but I also get a
Traceback:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\lib-tk\Tix.py", line 210, in __init__
self.tk.eval('package require Tix')
_tkinter.TclError: can't find package Tix

Of course I can fix this with a cheap try block, but wonder if there's a
better way.

try:
root = Tix.Tk()
except:
print "Tk exception caught"

Is Tix now broken or is there a new "proper" way to get a Tk root window?

Thanks,
Ron
 
G

Gabriel Genellina

Under Python2.5, the empty root window is displayed but I also get a
Traceback:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\lib-tk\Tix.py", line 210, in __init__
self.tk.eval('package require Tix')
_tkinter.TclError: can't find package Tix

It's a bug, already reported: http://www.python.org/sf/1568240
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top