When I was trying to use the pylab interface from a wxPython application, I noticed that the application did not close completely after exiting. A python process continued to run in the background even though no windows were open.
The show command was starting a MainLoop() for the wx application even if the MainLoop() was already running. When the application closed, this extra MainLoop() kept running in the background. I was able to fix this problem in my own install of matplotlib by only starting the wx MainLoop if the MainLoop was not already running.
I’ve submitted a patch to correct this problem (Tracker #1747313). I hope it’s in the correct format.