loading modules, metaclasses, chicken & eggs
sandro
sandro at e-den.it
Wed Nov 12 10:38:03 EST 2008
Hi,
I had two packages working fine toghether: debug and sqlkit. Debug
provides a metaclass just for debuggging purposes to sqlkit (to log
methods following a recipe on ASPN. It worked very well, just logging
depending on the value of a module variable in debug module. That
means module debug and it's variable where to be loaded before sqlkit.
Now I merged the two repos/packages (as I have publicly released them
and I thought it was easied to handle), but so doing:
from sqlkit import debug
already implies loading the class I want to log. In fact this class
Is loaded in
sqlkit/__init__.py
as it's the main one of the packages
Is there a way to solve this? I'd like ro force a reload of the
metaclass after 'debug' has been loaded and debug.DBG set to True,
but that doesn't seem to happen...
Any hints?
sandro
*:-)
sqlkit: http://sqlkit.argolinux.org
More information about the Python-list
mailing list