'Recursive search for python modules in base package'

def _modules_search(self):

    modules = []
    for (root, dirs, files) in os.walk(self.base_path):
        if (not os.path.exists(os.path.join(root, '__init__.py'))):
            continue
        root_package = self._path_to_package(root)
        for item in files:
            if item.endswith('.py'):
                module_name = '.'.join((root_package, os.path.splitext(item)[0]))
                if (not module_name.startswith(UNIT_TESTS_EXCLUDE)):
                    modules.append(module_name)
    return modules
