Py2exe and logging module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sfbell09

    Py2exe and logging module

    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.


  • Joe Francia

    #2
    Re: Py2exe and logging module

    sfbell09 wrote:[color=blue]
    > 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.
    >[/color]
    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

    Comment

    Working...