[wxPython-users] Better exception handling

Jorgen Bodde jorgen.maillist at gmail.com
Thu Jun 28 09:28:22 PDT 2007


I tried to start my app with redirect = True, but nothing seems to
happen. Can someone show me a mini example where a python exception
gets caught and a window is shown???

What I basically do is create my app with;

import gui.guitarportfolio as gpf

guitarportfolio = gpf.GuitarPortfolioApp(0, True)
guitarportfolio.MainLoop()

And there is no difference when I run this as a .pyw file where there
is no console window,,

Regards,
- Jorgen

On 6/28/07, Chris Mellon <arkanes at gmail.com> wrote:
> On 6/28/07, Gre7g Luterman <hafeliel at yahoo.com> wrote:
> > --- Chris Mellon <arkanes at gmail.com> wrote:
> >
> > > On 6/28/07, Jorgen Bodde <jorgen.maillist at gmail.com>
> > > The default behavior is for all output (including
> > > uncaught exceptions)
> > > to be show in a popup frame which will be created on
> > > demand. You can
> > > configure this in several ways with the argument to
> > > your wx.App
> > > constructor. You probably have redirect=False, if it
> > > prints to the
> > > command window you were launched in.
> >
> > That's strange, the help file I have for wxWidgets
> > shows that wx.App's constructor takes no parameters.
> > I had no idea you could tweak it.  Can you point me at
> > a list of what we can set?
>
> http://wxpython.wxcommunity.com/docs/api/wx.App-class.html#__init__
>
> This is a case where the wxPython API differs from the C++ wxWidgets api.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>




More information about the wxpython-users mailing list