MCPcopy Create free account
hub / github.com/daniel2005d/mapXplore / _load_module

Method _load_module

console/console.py:46–60  ·  view source on GitHub ↗
(self, arg=None)

Source from the content-addressed store, hash-verified

44
45
46 def _load_module(self, arg=None) -> None:
47 module = None
48 for command in self._commands:
49 self.do_back(command["module"])
50
51 if not hasattr(arg, 'module'):
52 module = QueryCommandSet(arg)
53 elif arg.module == 'import':
54 module = ImportCommand()
55 elif arg.module == 'config':
56 module = ConfigCommandSet(arg, section=arg.section)
57
58 if module is not None:
59 self._commands.append({"module":arg.module if hasattr(arg,'module') else 'main', "command":module, "args": arg})
60 self.register_command_set(module)
61
62 def _postcmd(self, data: cmd2.plugin.PostcommandData) -> cmd2.plugin.PostcommandData:
63 self.prompt = self._default_prompt

Callers 3

_postcmdMethod · 0.95
do_useMethod · 0.95
mainFunction · 0.95

Calls 5

do_backMethod · 0.95
QueryCommandSetClass · 0.90
ImportCommandClass · 0.90
ConfigCommandSetClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected