[Pythonmac-SIG] mac newbie... Tix . What is wrong?

Robert Kern rkern at ucsd.edu
Sat May 7 07:26:52 CEST 2005


Eric Texier wrote:
> Here is a simple example that works on linux, but not on MacOSX
> tigger.
> Thanks
> Eric
> 
> 
>>pythonw
> 
> Python 2.4.1 (#2, Apr 27 2005, 22:11:31) 
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
> Type "help", "copyright", "credits" or "license" for more
> information.
> 
>>>>import Tix
>>>>
>>>>def selectedFile(inFile):
> 
> ...    print inFile
> ... 
> 
>>>>root = Tix.Tk()
>>>>d = Tix.FileSelectDialog(root,command=selectedFile)
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tix.py",
> line 815, in __init__
>     ['options'], cnf, kw)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tix.py",
> line 307, in __init__
>     self.tk.call(widgetName, self._w, *extra)
> _tkinter.TclError: invalid command name "tix"

You don't have the Tcl package Tix installed. The Tiger-provided 
TclTkAqua installation does not come with Tix.

I'm not sure, but you can try installing the "Batteries Included" 
version of TclTkAqua from http://tcltkaqua.sourceforge.net

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


More information about the Pythonmac-SIG mailing list