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

Method run_ui

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

Run the CLI: See the doc of base_ui.BaseUI.run_ui for more details.

(self,
             init_command=None,
             title=None,
             title_color=None,
             enable_mouse_on_start=True)

Source from the content-addressed store, hash-verified

485 pass
486
487 def run_ui(self,
488 init_command=None,
489 title=None,
490 title_color=None,
491 enable_mouse_on_start=True):
492 """Run the CLI: See the doc of base_ui.BaseUI.run_ui for more details."""
493
494 # Only one instance of the Curses UI can be running at a time, since
495 # otherwise they would try to both read from the same keystrokes, and write
496 # to the same screen.
497 self._single_instance_lock.acquire()
498
499 self._screen_launch(enable_mouse_on_start=enable_mouse_on_start)
500
501 # Optional initial command.
502 if init_command is not None:
503 self._dispatch_command(init_command)
504
505 if title is not None:
506 self._title(title, title_color=title_color)
507
508 # CLI main loop.
509 exit_token = self._ui_loop()
510
511 if self._on_ui_exit:
512 self._on_ui_exit()
513
514 self._screen_terminate()
515
516 self._single_instance_lock.release()
517
518 return exit_token
519
520 def get_help(self):
521 return self._command_handler_registry.get_help()

Callers

nothing calls this directly

Calls 7

_screen_launchMethod · 0.95
_dispatch_commandMethod · 0.95
_titleMethod · 0.95
_ui_loopMethod · 0.95
_screen_terminateMethod · 0.95
acquireMethod · 0.80
releaseMethod · 0.45

Tested by

no test coverage detected