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

Method _get_user_command

tensorflow/python/debug/cli/curses_ui.py:593–613  ·  view source on GitHub ↗

Get user command from UI. Returns: command: (str) The user-entered command. terminator: (str) Terminator type for the command. If command is a normal command entered with the Enter key, the value will be the key itself. If this is a tab completion call (using the

(self)

Source from the content-addressed store, hash-verified

591 return
592
593 def _get_user_command(self):
594 """Get user command from UI.
595
596 Returns:
597 command: (str) The user-entered command.
598 terminator: (str) Terminator type for the command.
599 If command is a normal command entered with the Enter key, the value
600 will be the key itself. If this is a tab completion call (using the
601 Tab key), the value will reflect that as well.
602 pending_command_changed: (bool) If the pending command has changed.
603 Used during command history navigation.
604 """
605
606 # First, reset textbox state variables.
607 self._textbox_curr_terminator = None
608 self._textbox_pending_command_changed = False
609
610 command = self._screen_get_user_command()
611 command = self._strip_terminator(command)
612 return (command, self._textbox_curr_terminator,
613 self._textbox_pending_command_changed)
614
615 def _screen_get_user_command(self):
616 return self._command_textbox.edit(validate=self._on_textbox_keypress)

Callers 1

_ui_loopMethod · 0.95

Calls 2

_strip_terminatorMethod · 0.95

Tested by

no test coverage detected