Module modulefinder :: Class ModuleFinder
[hide private]
[frames] | no frames]

_ClassType ModuleFinder

Instance Methods [hide private]
 
__init__(self, path=None, debug=0, excludes=[], replace_paths=[])
 
msg(self, level, str, *args)
 
msgin(self, *args)
 
msgout(self, *args)
 
run_script(self, pathname)
 
load_file(self, pathname)
 
import_hook(self, name, caller=None, fromlist=None)
 
determine_parent(self, caller)
 
find_head_package(self, parent, name)
 
load_tail(self, q, tail)
 
ensure_fromlist(self, m, fromlist, recursive=0)
 
find_all_submodules(self, m)
 
import_module(self, partname, fqname, parent)
 
load_module(self, fqname, fp, pathname, (suffix, mode, type))
 
_add_badmodule(self, name, caller)
 
_safe_import_hook(self, name, caller, fromlist)
 
scan_code(self, co, m)
 
load_package(self, fqname, pathname)
 
add_module(self, fqname)
 
find_module(self, name, path, parent=None)
 
report(self)
Print a report to stdout, listing the found modules with their paths, as well as modules that are missing, or seem to be missing.
 
any_missing(self)
Return a list of modules that appear to be missing.
 
any_missing_maybe(self)
Return two lists, one with modules that are certainly missing and one with modules that *may* be missing.
 
replace_paths_in_code(self, co)
Method Details [hide private]

any_missing(self)

 

Return a list of modules that appear to be missing. Use any_missing_maybe() if you want to know which modules are certain to be missing, and which *may* be missing.

any_missing_maybe(self)

 

Return two lists, one with modules that are certainly missing and one with modules that *may* be missing. The latter names could either be submodules *or* just global names in the package.

The reason it can't always be determined is that it's impossible to tell which names are imported when "from module import *" is done with an extension module, short of actually importing it.