At 06:52 PM 4/10/2009 +1000, Nick Coghlan wrote: >This problem (slow application startup times due to too many imports at >startup, which can in turn can be due to top level imports for library >or framework functionality that a given application doesn't actually >use) is actually the main reason I sometimes wish for a nice, solid lazy >module import mechanism that manages to avoid the potential deadlock >problems created by using import statements inside functions. Have you tried http://pypi.python.org/pypi/Importing ? Or more specifically, http://peak.telecommunity.com/DevCenter/Importing#lazy-imports ? It does of course use the import lock, but as long as your top-level module code doesn't acquire locks (directly or indirectly), it shouldn't be possible to deadlock. (Or more precisely, to add any *new* deadlocks that you didn't already have.)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4