def do_use(self, args): """core: select module for modules""" if args in self.all_modules.keys(): if module_list()[args].ModPump.getInstance() != None: return (module_list()[args].ModPump.getInstance().cmdloop( "module: {} session has been restored".format( setcolor(args, color="yellow")))) module = module_list()[args].ModPump(self.parse_args, globals()) return module.cmdloop() print( display_messages( "the module [{}] was not found or failed to import.".format( setcolor(args, color="orange")), error=True, ))
def all_modules(self, module_list): m_avaliable = {} for name, module in module_list().items(): if hasattr(module, "ModPump"): m_avaliable[name] = module self._all_modules = m_avaliable
def do_use(self, args): """core: select module for modules""" if args in self.all_modules.keys(): module = module_list()[args].ModPump(self.parse_args, globals()) module.cmdloop()