From: Robin D. <ro...@al...> - 2005-04-09 17:30:26
|
and...@ti... wrote: > On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 months > ago, nearly), while on Windows 2000 I have Matplotlib 0.74. > Well, I am using the WXAgg backend. By looking at backend_wx.py in 0.73pre > (XP), I see that lines 116-117 are commented. These lines are: > > # wxapp = wxPySimpleApp() > # wxapp.SetExitOnFrameDelete(True) > > While on Matplotlib 0.74 (2000) they are NOT commented. Well, in my app > I don't need to initialize the wx.App() when calling plot/figure/Matplotlib > things, because my app has ALREADY initialized the wx.App(). > If I use Matplotlib (without wxPython) I will just add: > > import wx > MyApp = wx.PySimpleApp() > > Before using any Matplotlib command. > Is there a reason why these lines were commented on 0.73pre and now they > are not? Robin/John, could it be that the reason for which my application > does not return under Windows 2000? Yes. Having two app objects can certainly cause problems, although I wouldn't have expected it to manifest this way. Probably what is happening is that when the spashscreen is closed it is being added to the pending delete list but then the new app is being created and the pending delete list is reinitialized and so the splash screen never gets destroyed for real so the app's MainLoop keeps running waiting for it to be destroyed. To find out for sure you could try uncommenting those lines on your XP box and see if you then have the same problem. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! |