I would like to capture any error that happen in an app using PyQt I tried this: while 1: try: app.processEvents() except: do stuff here with sys.exc_info() but it doesn't quite work, i guess because of PyQt handling events in other threads. so my question is.. how do I capture all exceptions? thx.