--- a/pyscovery.py Sun May 26 05:37:49 2013 -0500
+++ b/pyscovery.py Sun May 26 05:43:42 2013 -0500
@@ -138,7 +138,7 @@
mod = importlib.import_module(module)
if recurse and _is_package(mod):
+ self._recurse(mod, modules) for symbol_name in dir(mod):
if symbol_name == cls_name:
@@ -172,7 +172,7 @@
return base == '__init__'
- def _recurse(self, module):
+ def _recurse(self, module, modules): Adds additional modules from a package
@@ -190,11 +190,11 @@
filename = os.path.join(dirname, name)
if os.path.isdir(filename):
- self.add_module(make_module(base))
+ self._real_add_module(make_module(base), modules) elif os.path.isfile(filename):
if fnmatch.fnmatch(name, '*.py') or \
fnmatch.fnmatch(name, '*.py[co]'):
- self.add_module(make_module(base))
+ self._real_add_module(make_module(base), modules) _DEFAULT_LOADER = Loader()