Py2exe and logging module

Joe Francia usenet at soraia.com
Sat Nov 1 10:53:19 EST 2003


sfbell09 wrote:
> Hi,
> 
> My question is about the logging module and py2exe. When my code is in
> natural python, all of the logging works perfectly. I have two logging
> functions, one is a File Handler, the other is a SMTP handler. Once I
> build the code using py2exe, the File Handler still works, but the
> SMTP does not send any messages. 
> 
> 1. Any thoughts on why this might be happening.
> 2. Is there any way for the executable to return debugging
> information? It's a wxPython gui app.
> 
> Thanks.
> 
A quick & dirty way is to build with py2exe's --console option, and 
traceback will print in the DOS window (which will close if your app 
quits - so handle those exceptions).

Other suggestions:  run in a debugger, or log activities to a file or to 
a separate wxPython frame|statusbar|text control.

Peace,
Joe





More information about the Python-list mailing list