【发布时间】:2012-02-07 04:27:29
【问题描述】:
如何访问 Python 的 help('modules') 显示的模块列表?它显示以下内容:
>>> help('modules')
Please wait a moment while I gather a list of all available modules...
...[list of modules]...
MySQLdb codeop mailman_sf spwd
OpenSSL collections markupbase sqlite3
Queue colorsys marshal sre
...[list of modules]...
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".
>>>
我可以在输出中查看列表,但想从 Python 程序中将其作为列表进行访问。我该怎么做?
【问题讨论】:
标签: python python-module