From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-12-27 14:45:46
|
On Fri, 26 Dec 2008 15:15:19 -0800 Kevin Altis <al...@se...> wrote: > PythonCard is just wxPython underneath, so yeah I would just do your > wxPython windows as child windows. The single wx.App as you > discovered is the big limitation and since PythonCard wouldn't work > without having all the setup from the initialization loop you must > let your PythonCard app be the initial control. Cheers. The main PythonCard application is basically a tree-control component that can be double-clicked to launch an old legacy Win32 application with different parameters based on the tree node selected. The wxPython window is a dialog window for sending report documents to the same database server as the legacy app. Both windows were developed in isolation and my initial plan was to be lazy and use the same threading code to handle the legacy application launching and the report window launching. It works, but the wxPython application is too slow. There's no reason anymore not to combine the code...other than time and effort. > In general, the initial loading of the wxPython runtime is slow the > first time, but once it has been done, subsequent loads can be > pretty fast as long as the application is still in the cache. You > would have to experiment to see if you're limited by memory or if > this is just a problem with a py2exe build; the executables will be > different for a "compiled" py2exe application than when you're > running wxPython out of the site-packages library of Python. I think I need to do some more research. Since both the PythonCard and wxPython application require the same runtime DLLs (Python 2.3 and wxPython 2.8) and the PythonCard window is already running, I was expecting caching to speed up the launch of the wxPython-only application. But it's taking several seconds even when you launch it several times in a row. Meanwhile, the legacy Win32 application is fast enough on the first launch and instant from then on. -- XXXXXXXXXXX Support4Omega Ltd. Tel: 07793 134456 Fax-2-Email: 0870 7051877 Web: www.support4omega.co.uk |