Create command dispatching classes

This commit is contained in:
2025-05-18 09:40:09 +02:00
parent 64536b40f6
commit 26ef9b45d4
9 changed files with 591 additions and 0 deletions

View File

@ -0,0 +1,12 @@
"""Various utilities."""
import asyncssh
from rich.console import Console
def get_console(process: asyncssh.SSHServerProcess[str]) -> Console:
"""Initiate console from process."""
_width, _height, pixwidth, pixheight = process.term_size
console = Console(
force_terminal=True, width=pixwidth, height=pixheight, color_system="standard"
)
return console