[IPython-dev] [Matplotlib-users] Bug in mathtext

Fernando Perez fperez.net at gmail.com
Wed Dec 5 14:34:18 EST 2007

On Dec 5, 2007 12:19 PM, Jörgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> Jörgen Stenarson skrev:
> >>
> >
> > Thanks Mike. I hope we can figure out what is causing the crashes but I
> > guess we can take this over on the ipython-list. Fernando have you tried
> > it on a windows machine? I'm using tkagg. Do you have any ideas on what
> > I could start testing to isolate the problem?
> >
> > /Jörgen
> Fernando, I found the problem. I have a pylab.show() in my
> generate_prompt hook to get automatic refresh after calling scripts.
> Anyway it seems exceptions raised here crash ipython. I don't know if
> this is intentional or not. I just put a try block around it as a
> workaround.

OK, that makes sense now.  I think it qualifies as a bug in our part,
since hooks should always  be protected.  They should generate the
traceback, but not crash out.

Trac-ticket it, baby :)

[ aside]  BTW, when I first wrote the pylab support, I added an
automatic show() at the end.  I later removed it to force users
(including myself, since I use this all day long) to put a


as the last line of my scripts.  Doing this ensures that the script
actually runs inside or outside of ipython equally well, without funny
surprises when you send it to a colleague (who doesn't use ipython)
and they see no plots :)  So now I've just become used to always
finishing all my scripts with the show() call.  That way, if there's
an exception in there, it still gets handled just like any other



More information about the IPython-dev mailing list