From: Alex T. <al...@tw...> - 2005-12-30 01:21:33
|
XXXXXXXXXXX wrote: > Hmmm...a chicken-and-egg problem...and a bit OT. > > Some of my PythonCard apps run on fairly old hardware, with the result > that the Python interpreter/runtime takes a while to start up with > nothing apparently happening as far as the user is concerned. A > loading splash screen would be good, but if this was summoned from > Python/PythonCard/wxPython then it would happen too late. > > Has anybody done any brainstorming on this and come up with a > solution, or is anyone aware of one? I remember hearing on a podcast > recently that a future version of Java will load some basic > functionality ahead of the JVM to allow splash screens to be drawn > early on, when an application is run that requires the JVM to be > loaded. I don't think Python allows anything like this, though I'd > love to be proved wrong. > 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. But that may be just because it deliberately holds the splashscreen up on screen for two seconds, rather than because it is going through the rest of its initialization. In any case, it may be worth your while trying what it does ..... 1. the demo.pyw is very small - all it does is "import Main" then call Main.main() This means that there is a "compiled" version of the majority of the program (Main.pyc) which may save some time. 2. The app is very small (load and display a bitmap, and schedule a call to the real app for two seconds later). So (with suitable arrangement of the code), you can delay most of your app's initialization to after the splash screen is visible. That may or may not help - depends how much time is just getting the base interpreter up and going. 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. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.9/216 - Release Date: 29/12/2005 |