2015-10-04

[SHARE] How a Python function can find the name of its caller « Python recipes « ActiveState Code

How a Python function can find the name of its caller « Python recipes « ActiveState Code
This recipe shows how a Python function can find out the name of its caller, i.e. which other Python function has called it. The function uses the sys._getframe…

via Instapaper http://ift.tt/1KLgXFw
Post a Comment