From: Thomas H. <th...@ct...> - 2008-02-29 08:48:58
|
geoff schrieb: > We have a wx.app that is packaged and distrubuted using py2exe and we > are trying to work thru our error/exception handling. > > In reviewing the boot_common.py there is a call to sys._MessageBo that > displays the final message box advising the user of the entry to the > app_exe.log file. Is there any "simple" way to over-ride this ? > > We would like to give the users a little more description of the error > and perhaps an "email support" button so we can take action. > > We tried doing this within wx - but once the exception gets raised, wx > shuts down the event loop and our "user friendly" message box gets > closed. > > Any advice/guidance/direction would be appreciated. The code in boot_common.py is simply executed before your script starts. So, in the main script you can, for example, replace sys.stderr (maybe also sys.stdout) with your own code that can do whatever you want. This would then completely disable the stuff that boot_common.py does when something is printed. Of course you can also hack around in boot_common.py... There may also be other mechanisms in wx, but I don't use wx so I cannot help with this. Thomas |