Skip to content

Kathara.foundation.manager.terminal.core.TerminalRunner

Tommaso Caiazzi edited this page Mar 19, 2026 · 1 revision

module Kathara.foundation.manager.terminal.core.TerminalRunner


class TerminalRunner

Bridge class between a console adapter and a terminal session.

Attributes:

  • console (IConsoleAdapter): OS-specific console adapter.
  • session (ITerminalSession): Wrapper of the manager terminal session.
  • _loop (Optional[asyncio.AbstractEventLoop]): Event loop from asyncio used by the runner.
  • _closed (bool): Boolean flag indicating whether the runner is terminated.
  • _tasks (list[asyncio.Task]): List of asyncio tasks created by the runner.
  • _session_fd (Optional[int]): File descriptor from session.fileno() when available.

method TerminalRunner.__init__

__init__(
    console: Kathara.foundation.manager.terminal.core.IConsoleAdapter.IConsoleAdapter,
    session: Kathara.foundation.manager.terminal.core.ITerminalSession.ITerminalSession
) → None

method TerminalRunner.close

close() → None

Stop the runner and perform cleanup.

Returns: None


method TerminalRunner.start

start() → None

Start the bridge and block until the runner stops.

This method: - creates and sets a new asyncio loop - enters console raw mode - starts watching resize and input - starts pumping session output to stdout - runs the loop forever until close() is invoked

Returns: None


This file was automatically generated via lazydocs.

Clone this wiki locally