def walkModules(self, importPackages=False):
        """
        Similar to L{iterModules}, this yields every module on the path, then every
        submodule in each package or entry.
        """
        for package in self.iterModules():
            for module in package.walkModules(importPackages=False):
                yield module

        Similar to L{iterModules}, this yields every module on the path, then every
        submodule in each package or entry.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/modules.py