propagation of error messages in matplotlib

I've updated backend_gtk.py in cvs to use a default

    > exception handler, and noticed a few things in the process:
    > - sys.excepthook does not catch SystemExit, which is what
    > we wanted anyway.

For some reason with matplotlib CVS using backend GTK on linux, I no
longer recover the linux shell when I close the figure by clicking on
the 'x' in the figure window

  > python somefile.py

I have to use CTRL-C.

This situation happens when the main window is destroyed but
gtk.main_quit() is not called - the gtk.main loop is still running.
I'm not seeing this problem at the moment.

In FigureManagerGTK the 'destroy' signal is connected to Gcf.destroy
(num), which should eventually call

class FigureManagerGTK
    def destroy(self, *args):
        self.window.destroy()
        if Gcf.get_num_fig_managers()==0 and not
matplotlib.is_interactive():
            gtk.main_quit()

I set DEBUG = True and ran a few examples and it showed
FigureManagerGTK.destroy() was being called as expected.
Perhaps Gcf.get_num_fig_managers() is sometimes not 0 when it should be
0 and gtk.main_quit() is not being called.

Steve

···

On Tue, 2004-11-23 at 16:38 -0600, John Hunter wrote:

    > I've updated backend_gtk.py in cvs to use a default
    > exception handler, and noticed a few things in the process:
    > - sys.excepthook does not catch SystemExit, which is what
    > we wanted anyway.

For some reason with matplotlib CVS using backend GTK on linux, I no
longer recover the linux shell when I close the figure by clicking on
the 'x' in the figure window

  > python somefile.py

I have to use CTRL-C.