Popular recipes tagged "evaluation" and "python" but not "exec"http://code.activestate.com/recipes/tags/evaluation+python-exec/2015-09-30T15:12:17-07:00ActiveState Code RecipesHow a Python function can find the name of its caller (Python)
2015-09-30T15:12:17-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/579105-how-a-python-function-can-find-the-name-of-its-cal/
<p style="color: grey">
Python
recipe 579105
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/evaluation/">evaluation</a>, <a href="/recipes/tags/introspection/">introspection</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sys/">sys</a>).
</p>
<p>This recipe shows how a Python function can find out the name of its caller, i.e. which other Python function has called it.</p>