Finding the calling method
Skip Montanaro
skip at pobox.com
Tue Jan 14 15:41:08 EST 2003
More information about the Python-list mailing list
Tue Jan 14 15:41:08 EST 2003
- Previous message (by thread): Finding the calling method
- Next message (by thread): Finding the calling method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): Finding the calling method
- Next message (by thread): Finding the calling method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list