Automatically find the source of a method invocation?

Robb Shecter rs at onsitetech.com
Fri Aug 30 15:12:47 EDT 2002


Hi,

I'm making a small publish/subscribe module for an application, and I 
want to have a reference to the source object that's sent a message.

I was wondering if there was a way of determining it without the object 
having to explicitly put a ref to itself in the method, ala:

(What I want to avoid:)
sendMessage(source=self, message=myMessage)

Any ideas?

Thanks,
Robb




More information about the Python-list mailing list