A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/335551.html below:

wxPython MainLoop exception handling problem

wxPython MainLoop exception handling problem wxPython MainLoop exception handling problemKreedz kreedz at gmail.com
Mon Sep 12 13:50:32 EDT 2005
Hi,

I'm making some intelligent logging module that redirects stdout and
stderr of a wxPython GUI. I am logging the exceptions in a wx TreeCtrl.
My problem is that when an exception is thrown, there are many calls to
stderr that are made which gives this kind of result:

Traceback (most recent call last):
  File "C:\somefolder\logger.py", line 711, in onTimer
a.index('notinlist')
ValueError
:
list.index(x): x not in list

(That is a test exception I made...)

Obviously I would not want it to use so many lines in the TreeCtrl, and
the lonely ":" on its line looks weird.

I looked through the wx App and saw the "OnExceptionInMainLoop"
function but could not override it successfully. Anybody have an idea
on how I could handle the exception myself so that I dont get lots of
calls to stderr ?

Thanks a lot!

- Kreedz


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4