Jay Loden wrote: > Brian Blais wrote: >> Hello, >> >> I am running OS X 10.4, on an Intel Mac, Python 2.5 not installed by >> source (I used the binary install from the website). When I do the >> following, I get an error: >> >> Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) >> [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import Tix >> >>> root=Tix.Tk() >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/lib-tk/Tix.py", line 210, in __init__ >> self.tk.eval('package require Tix') >> _tkinter.TclError: can't find package Tix >> > > I can confirm the same behavior and Google results are not promising: > > http://www.thescripts.com/forum/thread653175.html > http://aspn.activestate.com/ASPN/Mail/Message/ActivePython/3525325 > > I tried installing Tix from the binary TclAqua package, and when I run > root=Tix.Tk() I still get the same error (though, interestingly, a Tk window > does open). Looks like your best bet right now would be to install Tix via > fink if that's an option. > > -Jay
You need an up-to-date installation of the base Tix package on your system, in the same path as your Tcl/Tk libraries. I downloaded and built the most recent version of Tix from http://tix.sf.net (dated November 2006) and the Python samples run fine. I think the problem is that Tix is generally considered obsolete, or at least very outdated, by Tcl developers, so many distributions do not include it. It is not shipped with ActiveState on the Mac, nor does Apple include Tix in the Tcl/Tk libraries bundled with OS X. From my perspective there are far better, more modern alternatives, such as BWidgets, TkTreeCtrl, Tablelist, and Tile (all of which have Python wrappers) to enhance the core Tk widgets. Tix appears to be more widely used by Python/Tkinter developers than Tcl/Tk developers. -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list