wxPython newbie problems

Mel Wilson mwilson at the-wire.com
Sat Oct 19 11:36:20 EDT 2002


In article <3db1535b_10 at news.newsgroups.com>, JB <jb at yahoo.de> wrote:
>I should like to rewrite a small application that runs on
>PyQt/Linux to work on wxPython/WinNT (as Qt is not free on
>Windows).
>I hav installed wxPython and get some principal difficulties
>at the start:
>I open a text console and type in
>> python wxtest.py
>Then I get a window with some error messages but this window
>is closed again so I see only a flash and cannot read the
>error messages.
>Can somebody help me?

   I don't have anything elegant on this -- I just set up my
main program code as



import traceback
try:                    # The only way to debug in Python 2.1 / wxPython
    app = MyApp ()
    app.MainLoop ()
except:                 # The only way to debug in Python 2.1 / wxPython
    traceback.print_exc (file=open('error.txt', 'w'))



and then get the error messages from the error.txt file.

        Good Luck.      Mel.



More information about the Python-list mailing list