From: Johannes S. <ya...@gm...> - 2000-08-14 22:03:07
|
Michael Ströder wrote: > > But different versions of ldap.py will be necessary when > distributing C ldap-module and ldaplib separately. Python has a mechanism for handling optional modules: Catch ImportError. But this doesn't work here because of ldap.py vs. ldap package. > It's ok if we > rename Fog's stuff to ldaplib and keep ldap.py (small wrapper > module) and _ldapmodule.so. ACK. > And due to start-up latency when doing "import ldap" with lots of > stuff imported I want to keep both separated. ACK. > But what about the problem that _ldap.__version__ is not correctly > imported by the wrapper module ldap.py with "from _ldap import *"? Add "from _ldap import __version__". Note that Python is smart enough to load _ldap only once, so this second import is fast. Johannes |