Re: Import in a separate thread

2006-02-25 Thread Kent Johnson
cyberco wrote: > I want to import a long list of modules in a separate thread to speed > things up. How can I make the modules imported in that separate thread > accessible outside the method? > > === > import os > > # import rest in a separate thread > def importRest(): >

Re: Import in a separate thread

2006-02-25 Thread Grant Edwards
On 2006-02-25, cyberco <[EMAIL PROTECTED]> wrote: > Well, it is for the python implementation for Nokia Series 60 phones, > and loading lots of modules in such constrained environments can > certainly slow things down. The splashscreen idea is what I want to do, > but that requires the loading to

Re: Import in a separate thread

2006-02-25 Thread cyberco
Well, it is for the python implementation for Nokia Series 60 phones, and loading lots of modules in such constrained environments can certainly slow things down. The splashscreen idea is what I want to do, but that requires the loading to continue in a background thread. -- http://mail.python.or

Re: Import in a separate thread

2006-02-25 Thread Peter Hansen
Paul Rubin wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: >>Sounds like premature optimization. Speed "things" up? What things? >>How long is it taking now to load the modules you are loading? Even >>the wxPython demo takes only a few seconds to load on a decent >>machine, and that's loading

Re: Import in a separate thread

2006-02-25 Thread Paul Rubin
Peter Hansen <[EMAIL PROTECTED]> writes: > Sounds like premature optimization. Speed "things" up? What things? > How long is it taking now to load the modules you are loading? Even > the wxPython demo takes only a few seconds to load on a decent > machine, and that's loading a *heck* of a lot of

Re: Import in a separate thread

2006-02-25 Thread Peter Hansen
cyberco wrote: > I want to import a long list of modules in a separate thread to speed > things up. How can I make the modules imported in that separate thread > accessible outside the method? Sounds like premature optimization. Speed "things" up? What things? How long is it taking now to load

Re: Import in a separate thread

2006-02-25 Thread Paul Rubin
"cyberco" <[EMAIL PROTECTED]> writes: > I want to import a long list of modules in a separate thread to speed > things up. How can I make the modules imported in that separate thread > accessible outside the method? It won't speed things up unless the main thread is waiting for user input during t

Import in a separate thread

2006-02-25 Thread cyberco
I want to import a long list of modules in a separate thread to speed things up. How can I make the modules imported in that separate thread accessible outside the method? === import os # import rest in a separate thread def importRest(): import audio import socket