7

Possible Duplicate:
Unable to get a list of installed Python modules

How do I print a list of all the modules that are available for import from within my script in Python3?

Community
  • 1
  • 1
Baz
  • 11,687
  • 35
  • 137
  • 244

2 Answers2

6

To access the list of all installed modules accessible via sys.path programmatically rather than inside an interactive session, you can use pkgutil.iter_modules().

Sven Marnach
  • 530,615
  • 113
  • 910
  • 808
5

In ipython you can type "importTab".

In the standard Python interpreter, you can type "help('modules')".

At the command-line, you can use pydoc modules.

johnsyweb
  • 129,524
  • 23
  • 177
  • 239