From: John H. <jdh...@ac...> - 2003-10-22 01:12:11
|
>>>>> "Barry" == Barry Drake <bl...@ad...> writes: Barry> I'm observing some difference in behavior between the two Barry> versions. Running some example code in 0.29, after closing Barry> the plot windows, the python.exe process quits normally. Barry> The same example using 0.30 hangs the process and I have to Barry> kill it by hand. This occurs both at the command line and Barry> from within my editor (normally I execute from the editor). Barry> Any ideas? Do I need to change some set up from when I was Barry> using 0.29? Yes. I made several changes to this part of matplotlib to iron out some interactive bugs, and a new one crept in; I didn't notice it in my tests. The quick fix is to add the following code to matplotlib/backends/backend_gtk.py at line 773 if GcfGTK.get_num_figwins()==0 and ShowOn().is_mainloop_on(): gtk.mainquit() This is in the GcfGTK.destroy function, so the entire function should read def destroy(num): if not GcfBase.has_fignum(num): return figwin = GcfGTK.figs[num] figwin.figure.drawable= None GcfBase.destroy(num) if GcfGTK.get_num_figwins()==0 and ShowOn().is_mainloop_on(): gtk.mainquit() destroy = staticmethod(destroy) This should restore the old functionality -- let me know if you see anymore strangeness. I'll check the change into CVS. [BTW, I posted the 0.30 announce to this mailing list this afternoon, but it didn't seem to make it. Hmmm.... Have I been moderated out of existence :-) ] Thanks for the bug report, John Hunter |