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
  • 12,713
  • 38
  • 145
  • 268

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
  • 574,206
  • 118
  • 941
  • 841
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
  • 136,902
  • 23
  • 188
  • 247