MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / Cmd2GeneralConsole

Class Cmd2GeneralConsole

cmd2/rich_utils.py:554–573  ·  view source on GitHub ↗

Rich console for general-purpose printing. It enables soft wrap and disables Rich's automatic detection for markup, emoji, and highlighting.

Source from the content-addressed store, hash-verified

552
553
554class Cmd2GeneralConsole(Cmd2BaseConsole):
555 """Rich console for general-purpose printing.
556
557 It enables soft wrap and disables Rich's automatic detection
558 for markup, emoji, and highlighting.
559 """
560
561 def __init__(self, *, file: IO[str] | None = None) -> None:
562 """Cmd2GeneralConsole initializer.
563
564 :param file: optional file object where the console should write to.
565 Defaults to sys.stdout.
566 """
567 super().__init__(
568 file=file,
569 soft_wrap=True,
570 markup=False,
571 emoji=False,
572 highlight=False,
573 )
574
575
576class Cmd2RichArgparseConsole(Cmd2BaseConsole):

Callers 2

print_toMethod · 0.85
completeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…