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

ulysses ulysses_dm at yahoo.com.cn
Sat Nov 15 07:01:44 CET 2003


Thomas Heller <theller at python.net> wrote in message news:<ekwcv95p.fsf at python.net>...


Thank you very much.

I was killed this question. completely remove python22 and
python23,wxpython,py2exe.  then reinstall python22,wxpython,py2exe
0.4.1.

Rewrite my source code to a new py file. it's work.
I still don't know where is bug.  But I solve it. 
maybe my code very confusion. Python don't like awful code. :)

anyway ,thanks Heller. 


> ulysses_dm at yahoo.com.cn (ulysses) writes:
> 
> > I do a small test app for this. Still can't run.
>  
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > full source package 
> > please download from
> >
> > http://211.90.187.42/ourbt/gettexttest.rar
> >
> > you test in in your computer. Thanks.
> 
> I tried it, and it seems you have to make sure that the en.mo 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
> tracebacks.
> 
> 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
> 
> setup(name='testgettext',
>       options = {"py2exe": {"packages": ["encodings"]}},
>       windows = ['main.py'],
>       data_files = [("", ["en.mo"])],
>       )
> """
> 
> 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.
> 
> Thomas




More information about the Python-list mailing list