who called a function?

Ken Seehof kseehof at neuralintegrator.com
Thu Nov 15 03:11:09 EST 2001


import traceback
traceback.print_stack()

Familiarize yourself with the traceback module.  There are lots of goodies
there.

- Ken

> 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.
>
> Designing the webpages of tomorrow http://webme-eng.com
> Designing the MMORPGS of tomorrow http://worldforge.org






More information about the Python-list mailing list