On Wed, Feb 11, 2009 at 11:02 AM, Noam Aigerman <no...@answers.com> wrote: > Suppose I have a python object X, which holds inside it a python object Y. > How can I propagate each function call to X so the same function call in Y > will be called, i.e: > > X.doThatFunkyFunk() > > Would cause > > Y.doThatFunkyFunk()
Noam, using circuits [1] you could do this: ---- from circuits import Event, Component, Manager class X(Component): def doThatFunkyFunk(self): ... class Y(Component): def doThatFunkyFunk(self): ... manager = Manager() manager += X() manager += Y() manager.send(Event(), "doThatFunkyFunk") ---- cheers James [1] http://pypi.python.org/pypi/circuits/ -- http://mail.python.org/mailman/listinfo/python-list