[IPython-dev] Preventing "Oops, IPython crashed" ?
Hans Meine
hans_meine at gmx.net
Fri Aug 12 04:33:07 EDT 2005
On Thursday 11 August 2005 21:49, Fernando Perez wrote:
> So I'm afraid I don't really know how to solve this particular problem
> cleanly. Any ideas would be most welcome. Specifically, a way to trap the
> mpl exceptions only would do the trick, but all try/excepts I've tried to
> wrap around the mpl threads have so far failed.
Yes, I understood the problem is hard-to-impossible to solve cleanly, but what
I wanted to say is that it'd make sense to document the workaround
sys.excepthook = __IPYTHON__.excepthook
or even make it a configurable option. The problem I have is not with
matplotlib, but with Qt: If you write an interactive Qt program (which is
most probable if you're using Qt in the first place), your code will most
probably be executed from the GUI thread and as such all small mistakes in
your own code will result in this lengthy default exc.handler output.
I hard-coded the above statement into IPShellQt.__init__ since IPShellQt is
much less usable otherwise. So I propose a documented ipythonrc switch that
activates this, possibly only for IPShellQt if other toolkits work
differently.
I hope this made my intention more clear. :-)
Ciao,
Hans
More information about the IPython-dev
mailing list