can't run py app after compile to exe by py2exe , gettext

Thomas Heller theller at
Thu Nov 13 11:45:54 CET 2003

ulysses_dm at (ulysses) writes:

> I do a small test app for this. Still can't run.

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> full source package 
> please download from
> you test in in your computer. Thanks.

I tried it, and it seems you have to make sure that the file is in
the same directory as the exe, and you have to manually include the
'encodings' package - there's a command line switch for that.

To help to find these types of problems, it's always useful to build the
exe as a console version first with the --console command line flag to
py2exe.  There's no way for the --windows exe to notify you of the

And if you want to try the 0.5.0 version of py2exe (which requires
Python 2.3), here is the setup script you would use:

from distutils.core import setup
import py2exe

      options = {"py2exe": {"packages": ["encodings"]}},
      windows = [''],
      data_files = [("", [""])],

The latest py2exe 0.5.0 creates windows programs in such a way that
tracebacks are routed into a log file (that would be 'main.exe.log' in
the above case), and even displayes a message box when the program ends
pointing the user to the logfile.


More information about the Python-list mailing list