Skip to content

Kathara.foundation.manager.terminal.core.ITerminalSession

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

module Kathara.foundation.manager.terminal.core.ITerminalSession


class ITerminalSession

Abstract interface representing an interactive terminal session. Instances should wrap a manager session (bidirectional byte stream) with resize support.

Attributes:

  • _handler (Any): A manager-specific handler of the session.
  • _client (Optional[Any]): Manager client instance.
  • _closed (bool): Boolean flag indicating whether session termination was requested.

method ITerminalSession.__init__

__init__(handler: Any, client: Any) → None

method ITerminalSession.close

close() → None

Close the session and release resources.

Returns: None


method ITerminalSession.fileno

fileno() → Optional[int]

Return an OS-level file descriptor for the session, if available.

Returns:

  • Optional[int]: The file descriptor, or None if the session cannot be polled via fd-based readiness APIs.

method ITerminalSession.read

read(n: int = 4096) → bytes

Read up to n bytes from the session output stream.

Args:

  • n (int): Maximum number of bytes to read.

Returns:

  • bytes: Data read from the session.

method ITerminalSession.resize

resize(cols: int, rows: int) → None

Resize the session terminal dimensions.

Args:

  • cols (int): Terminal width in columns.
  • rows (int): Terminal height in rows.

Returns: None


method ITerminalSession.write

write(data: bytes) → None

Write bytes to the session input stream.

Args:

  • data (bytes): Data to send to the session.

Returns: None


This file was automatically generated via lazydocs.

Clone this wiki locally