擅长:python、mysql、java
<p>这个怎么样?不过,这会得到一个内置函数和变量的列表,而不是模块。。。</p>
<pre><code>dir(__builtins__)
</code></pre>
<p><code>help('modules')</code>将根据<a href="https://stackoverflow.com/questions/739993/unable-to-get-a-list-of-installed-python-modules">How can I get a list of locally installed Python modules?</a>提供所有模块的列表。但不是字符串列表。</p>