Home>

As the title suggests, searching for "Python + Module List" to get a list of Python module names results in the following code.

import pkgutil
for module in pkgutil.iter_modules ():
    print (module)

The output for this is

  

ModuleInfo (module_finder = FileFinder ('directory path'), name = 'requests', ispkg = True)
  ModuleInfo (module_finder = FileFinder ('directory path'), name = 'setuptools', ispkg = True)
  ModuleInfo (module_finder = FileFinder ('directory path'), name = 'urllib3', ispkg = True)

What is the meaning of the rightmost Boolean value (ispkg) though it is output as a list like

?