Most viewed recipes tagged "evaluation" and "python"http://code.activestate.com/recipes/tags/evaluation+python/views/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>
Universal eval to string function (Python)
2011-02-24T10:17:32-08:00Jakub Jankiewiczhttp://code.activestate.com/recipes/users/4028109/http://code.activestate.com/recipes/577585-universal-eval-to-string-function/
<p style="color: grey">
Python
recipe 577585
by <a href="/recipes/users/4028109/">Jakub Jankiewicz</a>
(<a href="/recipes/tags/evaluation/">evaluation</a>, <a href="/recipes/tags/exec/">exec</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>).
</p>
<p>This is a function that evaluate all expressions and statements and return the result as a string. It also return Exceptions as strings. It is used in <a href="http://trypython.jcubic.pl">trypython.jcubic.pl</a></p>