def load(self):
        """Find and load available modules."""
        self.logger.debug("Loading modules...")
        dirlist = os.listdir(self.module_path)
        for item in dirlist:
            # Skip 'hidden' dot files
            if item[0] == ".":
                continue
            parts = item.split(".")
            if len(parts) < 2:
                continue
            name = parts[0]
            ext = parts[-1]

            # only load .py modules that don't begin with an underscore
            if ext == "py" and name[0] != "_":
                module = self.load_single(name)
                if module:
                    # Load and store the module instance
                    inst = self.load_instance(module)
                    if inst:
                        self.modules[module[0]] = inst
dataset/ETHPy150Open richrd/suplemon/suplemon/module_loader.py/ModuleLoader.load/original