[Dev] Dabo, Wax, others?

Heikki Toivonen heikki at osafoundation.org
Thu Sep 15 15:47:14 PDT 2005


> Wax: http://sourceforge.net/projects/waxgui or maybe
> http://zephyrfalcon.org/labs/dope_on_wax.html

Just had a brief look at the 5 points why this is better than plain
wxPython, and one of the items looks like it could address one of our
core concerns, namely wxPython eating exceptions. I quote:

3. Easy setting of exception hook: in the main frame of the application,
you can set a magic method named __ExceptHook__, which deals with
uncaught exceptions. For example (code from examples/excepthook1.py):

from wax import *

class MainFrame(Frame):
    def Body(self):
        self.AddComponent(Button(self, "one", event=self.OnClick))
        self.Pack()
    def OnClick(self, event=None):
        # deliberately create an error
        x = 1/0
    def __ExceptHook__(self, exctype, value, traceback):
        dlg = ErrorDialog(self, exctype, value, traceback)
        dlg.ShowModal()
        dlg.Destroy()

app = Application(MainFrame)
app.MainLoop()

-- 
  Heikki Toivonen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/dev/attachments/20050915/03a44144/signature.pgp


More information about the Dev mailing list