From: Thomas H. <th...@py...> - 2005-12-30 12:35:13
|
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX writes: > On 30/12/05 01:22, Alex Tweedly wrote: >> I don't know if this is a solution or not .... but I've always >> noticed that the wxPython demo gets the splashscreen up there pretty >> quickly, and then the real window follows a while later. > <snip> > > I'd forgotten about the demo...wxPython (and wx in general) is still a > bit of a blind spot for me. But the splashscreen part looks pretty > straightforward. > >> That may or may not help - depends how much time is just getting the >> base interpreter up and going. > > Quite a large proportion of the loading by the look of it. The demo > splashscreen takes an age to appear on my cold-booted NT box (Pentium > 3 700MHz, 640MB RAM, 5400rpm ATA/100 drive...not an unusual spec. for > where I have to distribute my application). I have a 800MHz P3 box with 512 MB with XP SP2 for testing. Times are for py2exe created applications. An application with a custom GUI based on ctypes takes far less than a second to show the window. A wxPython app takes about 3 seconds. If this is too slow for you, or your system is slower, see below. >> If that doesn't help, you might consider a lightweight "main" >> program (not in Python) which simply displays the splashscreen and >> then runs the real app ... there are certainly shareware apps that >> do this, and a thorough search may well find a freeware one (for >> Windows - probably also for Mac or Linux but I don't know) >> See http://www.intrepidmouse.com/products/ssm/index.asp for a >> shareware example. > > I'm an old school C programmer and had considered creating a "stub" > that launches a py2exe/McMillan installer-created Python > executable. It was a bit of a last resort though ;-) For a C programmer it should not be a problem to extend the py2exe sources to include a dialog resource, then call CreateDialog somewhere to create the spash screen. The C code could DestroyWindow the dialog just before starting the Python main script, or you could even expose a DestroySplashscreen function to Python which would then destroy the dialog after the GUI is initialized. Thomas |