parameters: (self, module_spec)
docstring: Prepare the module commands
docstring_summary: Prepare the module commands
docstring_tokens: Prepare the module commands
function: def _prepare_module_commands(self, module_spec):
          '''Prepare the module commands'''
          module = ModuleInfo(name = module_spec.get_module_name(),
                              desc = module_spec.get_module_description())
          for command in module_spec.get_commands_spec():
              cmd = CommandInfo(name = command["command_name"],
                                desc = command["command_description"])
              for arg in command["command_args"]:
                  param = ParamInfo(name = arg["item_name"],
                                    type = arg["item_type"],
                                    optional = bool(arg["item_optional"]),
                                    param_spec = arg)
                  if ("item_default" in arg):
                      param.default = arg["item_default"]
                  if ("item_description" in arg):
                      param.desc = arg["item_description"]
                  cmd.add_param(param)
              module.add_command(cmd)
          self.add_module_info(module)
function_tokens: def _prepare_module_commands ( self , module_spec ) : module = ModuleInfo ( name = module_spec . get_module_name ( ) , desc = module_spec . get_module_description ( ) ) for command in module_spec . get_commands_spec ( ) : cmd = CommandInfo ( name = command [ "command_name" ] , desc = command [ "command_description" ] ) for arg in command [ "command_args" ] : param = ParamInfo ( name = arg [ "item_name" ] , type = arg [ "item_type" ] , optional = bool ( arg [ "item_optional" ] ) , param_spec = arg ) if ( "item_default" in arg ) : param . default = arg [ "item_default" ] if ( "item_description" in arg ) : param . desc = arg [ "item_description" ] cmd . add_param ( param ) module . add_command ( cmd ) self . add_module_info ( module )