Python, Tcl, Tix ...

R. Pito Salas rps at salas.com
Sat Mar 21 12:38:37 PDT 2009


Hi,

I am trying to get an application running which is in Python, and in  
turn invokes Tcl to use Tix.

I've been struggling with path problems and am totally stuck. I admit  
that I don't know Python, nor Tcl nor Tix. But I am pretty good at  
following the patterns. I think that what's happening is that there  
are several versions of Tcl and Python on my machine, and the wrong  
one is getting invoked.

Here are some details:

Here's the command that gives an error:

/mydev/politics/bb51$ python BBrowser.py
Traceback (most recent call last):
   File "BBrowser.py", line 1456, in <module>
     root = Tix.Tk()
   File "/opt/local/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


Here's the version of python that I am using:

/mydev/politics/bb51$ which python
/opt/local/bin/python

 From the command line here's the version of Tclsh that I get:

/mydev/politics/bb51$ which tclsh
/opt/local/bin/tclsh


If I run a different version of Tcl then Tix does work:

/usr/bin/tclsh
% package require Tix

It seems like I have Tix installed in the 'wrong' copy of Tcl.

QUESTION:
The most logical thing would be to install Tix with MacPorts, so that,  
in theory all will be tied together, but I don't think there's a  
MacPorts Tix Port, is there?

Any assistance would be greatly appreciated!

Pito






More information about the macports-users mailing list