My last message was in error from something other than my normal e-mail program. Here it is in a readable format:
Apologies if this is an old question, but I wasn't able to find an answer by googling or searching the archives. I have two simple applications using wxWidgets (2.5.1.5u) and python (2.3) that does some calculations on stock prices (find the last time a stock moved this much or was at today's value). I'm distributing it using py2exe (0.5.0). The main windows in both cases are dialog-like with less than two dozen controls each. The app executables are just 24KB each. But of course those load many tens of megabytes of python and wx code before running.
The problem I'm having is that they take a long time to start up. On some our slower PCs, it can take a minute or more. That's prompting some users to click on the icon two or three times because they think it didn't work. Then three copies launch (behind another window, so they can't see it -- the usual novice-support blues). I'm trying to quickly throw something on the screen so that the user is aware that the app is coming, eventually. I tried a splashscreen, like so:
class MyApp(wxApp):
def OnInit(self):
bmp = wx.Image("lib/splash.bmp").ConvertToBitmap()
splash = wx.SplashScreen(bmp,
wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
6000, None, -1)
wx.BeginBusyCursor()
splash.Show()
wxInitAllImageHandlers()
self.main = wxMoveSince.create(None)
self.main.CentreOnScreen()
self.main.Show()
self.SetTopWindow(self.main)
wx.EndBusyCursor()
return True
def main():
application = MyApp(0)
application.MainLoop()
But all that does is load the splashscreen immediately (as in a split second) before the main window, so it appears to be the large libraries and not the code itself.
Any ideas? What's the fastest way to show some activity? Should I do a quicker loader in C, just to show the splashscreen and then load the python programs? Is there an alternative executable maker that may be faster?