class_docstr: Base class of tfdbg user interface.
class_docstr_tok: ["Base","class","of","tfdbg","user","interface","."]
docstr: Constructor of the base class.
  
  Args:
    on_ui_exit: (`Callable`) the callback to be called when the UI exits.
    config: An instance of `cli_config.CLIConfig()` carrying user-facing
      configurations.
docstr_tok: ["Constructor","of","the","base","class",".","Args",":","on_ui_exit",":","(","`","Callable","`",")","the","callback","to","be","called","when","the","UI","exits",".","config",":","An","instance","of","`","cli_config.CLIConfig","(",")","`","carrying","user-facing","configurations","."]
code: def __init__(self, on_ui_exit=None, config=None):
      """Constructor of the base class.
  
      Args:
        on_ui_exit: (`Callable`) the callback to be called when the UI exits.
        config: An instance of `cli_config.CLIConfig()` carrying user-facing
          configurations.
      """
  
      self._on_ui_exit = on_ui_exit
  
      self._command_handler_registry = (
          debugger_cli_common.CommandHandlerRegistry()
      )
  
      self._tab_completion_registry = (
          debugger_cli_common.TabCompletionRegistry()
      )
  
      # Create top-level tab-completion context and register the exit and help
      # commands.
      self._tab_completion_registry.register_tab_comp_context(
          [""],
          self.CLI_EXIT_COMMANDS
          + [debugger_cli_common.CommandHandlerRegistry.HELP_COMMAND]
          + debugger_cli_common.CommandHandlerRegistry.HELP_COMMAND_ALIASES,
      )
  
      self._config = config or cli_config.CLIConfig()
      self._config_argparser = argparse.ArgumentParser(
          description="config command", usage=argparse.SUPPRESS
      )
      subparsers = self._config_argparser.add_subparsers()
      set_parser = subparsers.add_parser("set")
      set_parser.add_argument("property_name", type=str)
      set_parser.add_argument("property_value", type=str)
      set_parser = subparsers.add_parser("show")
      self.register_command_handler(
          "config",
          self._config_command_handler,
          self._config_argparser.format_help(),
          prefix_aliases=["cfg"],
      )
  
file_path: tensorflow/tensorflow/python/debug/cli/base_ui.py
imports: import argparse
  from tensorflow.python.debug.cli import cli_config
  from tensorflow.python.debug.cli import command_parser
  from tensorflow.python.debug.cli import debugger_cli_common
label_desc: Use image node_id 1 to create a new BaseUI object from inherited base classes: object with example: obj = BaseUI(on_ui_exit, config)