Rich console for general-purpose printing. It enables soft wrap and disables Rich's automatic detection for markup, emoji, and highlighting.
| 552 | |
| 553 | |
| 554 | class 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 | |
| 576 | class Cmd2RichArgparseConsole(Cmd2BaseConsole): |