MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _parse_command

Method _parse_command

tensorflow/python/debug/cli/base_ui.py:134–155  ·  view source on GitHub ↗

Parse a command string into prefix and arguments. Args: command: (str) Command string to be parsed. Returns: prefix: (str) The command prefix. args: (list of str) The command arguments (i.e., not including the prefix). output_file_path: (str or None) The pat

(self, command)

Source from the content-addressed store, hash-verified

132 raise NotImplementedError("run_ui() is not implemented in BaseUI")
133
134 def _parse_command(self, command):
135 """Parse a command string into prefix and arguments.
136
137 Args:
138 command: (str) Command string to be parsed.
139
140 Returns:
141 prefix: (str) The command prefix.
142 args: (list of str) The command arguments (i.e., not including the
143 prefix).
144 output_file_path: (str or None) The path to save the screen output
145 to (if any).
146 """
147 command = command.strip()
148 if not command:
149 return "", [], None
150
151 command_items = command_parser.parse_command(command)
152 command_items, output_file_path = command_parser.extract_output_file_path(
153 command_items)
154
155 return command_items[0], command_items[1:], output_file_path
156
157 def _analyze_tab_complete_input(self, text):
158 """Analyze raw input to tab-completer.

Callers 2

_dispatch_commandMethod · 0.80
_dispatch_commandMethod · 0.80

Calls 1

stripMethod · 0.80

Tested by

no test coverage detected