MCPcopy Create free account
hub / github.com/apache/impala / _populate_command_list

Method _populate_command_list

shell/impala_shell/impala_shell.py:381–388  ·  view source on GitHub ↗

Populate a list of commands in the shell. Each command has its own method of the form do_ , and can be extracted by introspecting the class directory.

(self)

Source from the content-addressed store, hash-verified

379 self.close_connection()
380
381 def _populate_command_list(self):
382 """Populate a list of commands in the shell.
383
384 Each command has its own method of the form do_<command>, and can be extracted by
385 introspecting the class directory.
386 """
387 # Slice the command method name to get the name of the command.
388 self.commands = [cmd[3:] for cmd in dir(self.__class__) if cmd.startswith('do_')]
389
390 def _disable_readline(self):
391 """Disables the readline module.

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected