import sys STDERR = sys.stderr # Keep stderr because wxPyhon will redirect it. import wx [...your wxPython program goes here...] if __name__ == "__main__": import traceback,sys try: app = MyWxApplication() # Start you wxPython application here. app.MainLoop() except: traceback.print_exc(file=STDERR) #//python/1872