Bill Campbell wrote:
> Is there a way in python for a method to determine its parent?
> 
> In particular, I'm working with SimpleXMLRPCServer, and would
> like to be able to find the client_address in the routine that
> has been dispatched.  I know that client_address is an attribute
> of the handler class instance, but don't know how to get to that.

You can inspect the stack frame to find this out. Search the online cookbook 
for _getframe - I don't see one recipe that does exactly what you want but the 
pieces are there.
http://aspn.activestate.com/ASPN/Cookbook/Python

Kent

-- 
http://www.kentsjohnson.com

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to