problem using py2exe

Kevin@Cazabon.com kevin at cazabon.com
Fri Feb 21 00:32:13 EST 2003


If tkSnack has a dynamic loading system (like Pmw or PIL), then you can't
use it directly with py2exe...

Pmw has a way to "package" everything into a single .py file, specifically
so you can "freeze" it or use py2exe.  With PIL, I just specify
"excludes-PIL" in the setup.cfg file for py2exe, and put the PIL directory
in with the .exe file.

If you can't get around the dynamic loader, then you'll have to exclude
tkSnack and put it in "raw" after.

Kevin.


"Ho-Kyeong" <illuza at eoneo.co.kr> wrote in message
news:b340gi$4ko$1 at news1.kornet.net...
> Can anybody give me a detailed explanation of using extension modules
> in py2exe? My python code imports 'tkSnack', a extension module, and
> my setup.py is like this:
>
> #setup.py
> from distutils.core import setup
> import py2exe
>
> setup(name="pitch",
>  scripts=["pitch.py"]
>  )
>
> (that is, pitch.py imports tkSnack.)
>
> In cmd, I type 'python setup.py py2exe'. It works well, but I execute
> the pitch.exe, then error happens.
>
> Traceback (most recent call last):
>   File "<string>", line 14, in ?
>   File "<string>", line 7, in pitch
>   File "tkSnack.pyc", line 21, in initializeSnack
> TclError: can't find package snack
>
> I look up in python.org, but I have no idea.
>
>






More information about the Python-list mailing list