def _process_input(self):
input_ = prompt('> ', get_bottom_toolbar_tokens=self._get_toolbar,
style=self.style, history=self.history,
completer=self.completer, complete_while_typing=False,
key_bindings_registry=self.registry)
input_ = input_.split(' ')
cmd = input_[0]
args = input_[1:]
if cmd == '':
return
try:
args = self.parser.parse_args(input_)
result = getattr(self, 'cmd_{}'.format(cmd))(args)
if result:
print(result)
except SystemExit:
pass
评论列表
文章目录