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.
pkg_name, path) |
oldname, newname) |
[path=None, debug=0, excludes=[], replace_paths=[]]) |
This class provides run_script() and report()
methods to determine the set of modules imported by a script.
path can be a list of directories to search for modules; if not
specified, sys.path
is used.
debug sets the debugging level; higher values make the class print
debugging messages about what it's doing.
excludes is a list of module names to exclude from the analysis.
replace_paths is a list of (oldpath, newpath)
tuples that will be replaced in module paths.
) |
pathname) |
See About this document... for information on suggesting changes.