modulefinder
modulefinder — Find modules used by a script
Source code: Lib/modulefinder.py
This module provides a ModuleFinder
class that can be used to determine the set of modules imported by a script. modulefinder.py
can also be run as a script, giving the filename of a Python script as its argument, after which a report of the imported modules will be printed.
-
modulefinder.AddPackagePath(pkg_name, path)
-
Record that the package named pkg_name can be found in the specified path.