avid.common.console_abstraction.Console

class avid.common.console_abstraction.Console(file: TextIO | None = None, width: int | None = None)

Bases: object

Console abstraction that uses rich if available, falls back to simple stdout otherwise. Provides a subset of rich.Console functionality with graceful degradation.

__init__(file: TextIO | None = None, width: int | None = None)

Methods

__init__([file, width])

print(*objects[, sep, end, style])

Print objects to the console with optional styling

rule([title, characters, style])

Print a horizontal rule

Attributes

is_terminal

Check if output is going to a terminal

property is_terminal: bool

Check if output is going to a terminal

print(*objects, sep: str = ' ', end: str = '\n', style: str | None = None, **kwargs)

Print objects to the console with optional styling

rule(title: str | None = None, characters: str = '─', style: str | None = None)

Print a horizontal rule