who called a function?

Paul Rubin phr-n2001d at nightsong.com
Thu Nov 15 07:37:48 CET 2001


<kosh at aesaeion.com> writes:
> How can I find out what object called a function and essentially step back
> through that? At most I need to step back about 4 to 5 levels but it would
> be very useful for me to find a particular object back up the list and
> change behavior based on that. Mostly I just wants the self var as I step
> back until I find the one I want.

Raise and catch an exception and examine the stack trace object.



More information about the Python-list mailing list