Finding the calling method

Mark itcram at yahoo.com
Wed Jan 15 10:52:09 EST 2003


Skip Montanaro <skip at pobox.com> wrote in message news:<mailman.1042576952.30705.python-list at python.org>...
> Mark> Is there a way while I'm inside method B to find out what method
>     Mark> called it, which would be method A.
> 
> Check out sys._getframe() and various functions exposed in the inspect
> module (getframeinfo(), currentframe(), stack(), etc).
> 
> Skip

Thanks for the adivce!!!!!!!

-Mark




More information about the Python-list mailing list