Supplementary information:
 
The setup.py attached does copy all tk and tix dlls to the root of the dist folder:
Excerpt of log during setup.py execution:
 
...

*** copy dlls ***

copying C:\Python25\DLLs\tk84.dll -> C:\svn-sandbox\radar\research\scipy\src\com\terma\kha\py2exe\dist

...

copying C:\Python25\DLLs\tcl84.dll -> C:\svn-sandbox\radar\research\scipy\src\com\terma\kha\py2exe\dist

*** copy data files ***

...

copying C:\Python25\DLLs\tix84.dll -> C:\svn-sandbox\radar\research\scipy\src\com\terma\kha\py2exe\dist\.

...



The only problem is that apparently, the dll is expected to be placed in a DLLs subfolder to dist as reported in the error log

 

The tix.py, line 210 is the last line in the Tk constructor

class Tk(Tkinter.Tk, tixCommand):
    """Toplevel widget of Tix which represents mostly the main window
    of an application. It has an associated Tcl interpreter."""
    def __init__(self, screenName=None, baseName=None, className='Tix'):
        Tkinter.Tk.__init__(self, screenName, baseName, className)
        tixlib = os.environ.get('TIX_LIBRARY')
        self.tk.eval('global auto_path; lappend auto_path [file dir [info nameof]]')
        if tixlib is not None:
            self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib)
            self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib)
        # Load Tix - this should work dynamically or statically
        # If it's static, tcl/tix8.1/pkgIndex.tcl should have
        #               'load {} Tix'
        # If it's dynamic under Unix, tcl/tix8.1/pkgIndex.tcl should have
        #               'load libtix8.1.8.3.so Tix'
        self.tk.eval('package require Tix') # <-- Program fails here!

Kim

2010/3/22 Kim Hansen <slaunger@gmail.com>
Hi py2exe list,
 
I cannot figure out how to make setup.py generate a dist/DLLs folder with tix84.dll placed in it.
 
When I run the generated exe file, the error log says:
 
Traceback (most recent call last):
  File "alphabeta.py", line 371, in <module>
  File "alphabeta.py", line 23, in __init__
  File "alphabeta.py", line 31, in create_widgets
  File "Tix.pyc", line 210, in __init__
_tkinter.TclError: couldn't load library "C:/.../dist/DLLs/tix84.dll": this library or a dependent library could not be found in library path
I am making a Tkinter/Tix/Matplotlib Python prototype for product.
 
Until recently I only used TkInter controls and the TkAgg matplotlib backend, and I had success with a setup.py, where this combination works (a nice user on the matplotlib users list helped me with the setup.py for that one).
 
Now, I have started also using some Tix widgets, and, not surprisingly the setup.py did not work, but I then tried to extend it using the first brute force example based on Tix8.1 
http://www.py2exe.org/index.cgi/TixSetup
 
I am using Tix8.4 and I have Tix84.dll in my C:\Python25\DLLs folder, so I simply updated the example to 8.4 by just changing the version number in the example to extend my setup.py (attached)
 
Python:2.5.2
Py2exe: 0.5.9
OS: Win XP
 
So, what is wrong with the setup.py?
 
Best wishes,
 
Kim
 
What am I doing wrong.