예제 #1
0
 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,
         ))
예제 #2
0
 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
예제 #3
0
 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()