擅长:python、mysql、java
<p>您可以使用<a href="http://docs.python.org/2/library/inspect.html" rel="nofollow">inspect</a>模块:</p>
<pre><code>import inspect
import sys
def test():
pass
functions = [name for name, obj in inspect.getmembers(sys.modules[__name__], inspect.isfunction)]
print functions
</code></pre>
<p>印刷品:</p>
<pre><code>['test']
</code></pre>