Automatically find the source of a method invocation?

Robb Shecter rs at
Fri Aug 30 21:12:47 CEST 2002


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?


More information about the Python-list mailing list