FAQ
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

Search Discussions

  • Aaron Brady at Nov 12, 2008 at 8:31 pm

    On Nov 12, 9:38?am, sandro wrote:
    Hi,
    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
    Look at the 'reload' function.
  • Sandro at Nov 12, 2008 at 9:01 pm

    Aaron Brady wrote:
    On Nov 12, 9:38?am, sandro wrote:
    Hi,
    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
    *:-)
    http://sqlkit.argolinux.orgttp://sqlkit.argolinux.org

    Look at the 'reload' function.
    That's exactely what I did but I get the followin error:

    Traceback (most recent call last):
    File "/home/misc/src/hg/py/pysia/program.py", line 123, in ore_mask
    self.om = SqlMask(Class=Real, **self.meta)
    File "/misc/src/hg/py/sqlkit/sqlkit/widgets/mask/mask.py", line 51, in __init__
    sqlwidget.SqlWidget.__init__(self, *args, **kw)
    TypeError: unbound method __init__() must be called with SqlWidget instance as first argument (got SqlMask instance instead)


    (SqlMask inherits from SqlWidget)

    ?

    sandro
    *;-)
  • Aaron Brady at Nov 12, 2008 at 10:13 pm

    On Nov 12, 3:01?pm, sandro wrote:
    Aaron Brady wrote:
    On Nov 12, 9:38?am, sandro wrote:
    Hi,
    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
    *:-)
    http://sqlkit.argolinux.orgttp://sqlkit.argolinux.org
    Look at the 'reload' function.
    That's ?exactely what I did but I get the followin error:

    Traceback (most recent call last):
    ? File "/home/misc/src/hg/py/pysia/program.py", line 123, in ore_mask
    ? ? self.om = SqlMask(Class=Real, **self.meta)
    ? File "/misc/src/hg/py/sqlkit/sqlkit/widgets/mask/mask.py", line 51, in __init__
    ? ? sqlwidget.SqlWidget.__init__(self, *args, **kw)
    TypeError: unbound method __init__() must be called with SqlWidget instance as first argument (got SqlMask instance instead)

    (SqlMask inherits from SqlWidget)

    ?

    sandro
    *;-)
    What did you do to merge the two packages?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedNov 12, '08 at 3:38p
activeNov 12, '08 at 10:13p
posts4
users2
websitepython.org

2 users in discussion

Aaron Brady: 2 posts Sandro: 2 posts

People

Translate

site design / logo © 2022 Grokbase