absolute namespace for callbacks?

Bruce Edge bedge at troikanetworks.com
Tue Mar 6 11:33:08 EST 2001


My callback func is defined in one module, and the callback is executed
from another module which does not know in advance what module the
callback func resides in. So, by default, the caller cannot find the
callback func in it's own namespace.
The callback registration procedure needs to specify the namespace where
the callback func exists.

OTOH, maybe I'm missing something here :-)

-Bruce.

Werner Schiendl wrote:
> 
> What's the matter?
> 
> You do not pass the name, but a reference to the function
> (the function is an object for python like anything else)
> It does not matter where the function is defined...
> 
> or did I miss anything in your post?
> 
> hth
> werner
> 
> Bruce Edge <bedge at troikanetworks.com> wrote in message
> news:3AA50AFB.83C7459F at troikanetworks.com...
> > Tcl has a func to get a fully qualified namespace from a context. This
> > is essential for registering callback functions.
> > How does one register a callback in Python, when the callback func
> > exists in a different namespace?
> >
> > Is there any method to get the current absolute namespace?
> >
> > Thanks, Bruce.
> >



More information about the Python-list mailing list