Property to return all sub-modules of the node, recursively.

        Returns:
            list of Module: the sub-modules.
359888
def submodules(self):
        
        submodules = []
        submodules.extend(self.modules)
        for p in self.packages:
            submodules.extend(p.submodules)
        return submodules
1334552
def get_all_descendants(parent):
    """"""
    children = parent.__subclasses__()
    descendants = children[:]
    for child in children:
        descendants += get_all_descendants(child)
    return descendants
1112144
def get_all_children(self):
        
        my_children = self.get_children_list()
        children = []
        children.extend(my_children)
        for child in my_children:
            children.extend(child.get_all_children())
        return children
1225683
def get_all_properties(self):
        
        properties = {
            prop_name: getattr(self, prop_name)
            for prop_name in self._property_list
        }

        return properties
1285674
public List<ModuleType<ApplicationType<T>>> getAllModule()
   {
      List<ModuleType<ApplicationType<T>>> list = new ArrayList<ModuleType<ApplicationType<T>>>();
      List<Node> nodeList = childNode.get("module");
      for(Node node: nodeList)
      {
         ModuleType<ApplicationType<T>>  type = new ModuleTypeImpl<ApplicationType<T>>(this, "module", childNode, node);
         list.add(type);
      }
      return list;
   }
934778
def getAllNodes(self):
        '''
            
        '''

        ret = TagCollection()

        for rootNode in self.getRootNodes():
            ret.append(rootNode)

            ret += rootNode.getAllChildNodes()

        return ret
440581
public List<ModuleType<ApplicationDescriptor>> getAllModule()
   {
      List<ModuleType<ApplicationDescriptor>> list = new ArrayList<ModuleType<ApplicationDescriptor>>();
      List<Node> nodeList = model.get("module");
      for(Node node: nodeList)
      {
         ModuleType<ApplicationDescriptor>  type = new ModuleTypeImpl<ApplicationDescriptor>(this, "module", model, node);
         list.add(type);
      }
      return list;
   }
1240139
def _get_components(self):
        
        return tuple([self._getitem__components(i) for
                     i in range(self._len__components())])
795382
def get_siblings(self):
        
        if self.lft == 1:
            return self.get_root_nodes()
        return self.get_parent(True).get_children()
455082
def get_recursive_subclasses(cls):
    """"""
    return cls.__subclasses__() + [g for s in cls.__subclasses__() for g in get_recursive_subclasses(s)]
848423
def get_siblings(self):
        
        if self.parent:
            return get_result_class(self.__class__).objects.filter(
                parent=self.parent)
        return self.__class__.get_root_nodes()
603446
def members(self):
        
        res = [self]
        for c in list(self.children.values()):
            res.extend(c.members)
        return res
198884
def _getModules(self):
        
        modules = {}
        modulesPath = os.path.join("application", "module")
        moduleList = os.listdir(modulesPath)

        for moduleName in moduleList:
            modulePath = os.path.join(modulesPath, moduleName, "module.py")
            if not os.path.isfile(modulePath):
                continue

            # importing module
            moduleSpec = importlib.util.spec_from_file_location(
                moduleName,
                modulePath
            )
            module = importlib.util.module_from_spec(moduleSpec)
            moduleSpec.loader.exec_module(module)

            # initializing module
            moduleInstance = module.Module(self)
            modules[moduleName] = moduleInstance

        return modules
851287
def import_submodules(package, recursive=True):
    
    if isinstance(package, str):
        package = importlib.import_module(package)
    results = {}
    for loader, name, is_pkg in pkgutil.walk_packages(package.__path__):
        full_name = package.__name__ + "." + name
        results[name] = importlib.import_module(full_name)
        if recursive and is_pkg:
            results.update(import_submodules(full_name))
    return results
721533
def list_submodules(module_name: str) -> List[str]:   # pylint: disable=invalid-sequence-index
    
    _module = importlib.import_module(module_name)
    return [module_name+'.'+submodule_name for _, submodule_name, _ in pkgutil.iter_modules(_module.__path__)]
1061279
def find_stack_elements(self, module, module_name="", _visited_modules=None):
        
        from types import ModuleType
        if _visited_modules is None: _visited_modules = []
        _visited_modules.append(module)
        #
        elements = []
        for el_name in dir(module):
            the_el = module.__getattribute__(el_name)
            if isinstance(the_el, ModuleType):
                # Recursively go into the module
                if the_el in _visited_modules:
                    continue
                elements = elements + self.find_stack_elements(the_el, module_name + el_name + ".", _visited_modules)
            elif isinstance(the_el, StackElement):
                # Add to list
                elements.append((module_name, el_name, the_el))
        return elements
1322143
public static List<DbModule> getAllSubmodules(final DbModule module) {
        final List<DbModule> submodules = new ArrayList<DbModule>();
        submodules.addAll(module.getSubmodules());

        for(final DbModule submodule: module.getSubmodules()){
            submodules.addAll(getAllSubmodules(submodule));
        }

        return submodules;
    }