libvt.screen

Screen and ScreenSet grid state. Compatibility re-exports for cell, cursor, row, and region views live in libvt.views.

Zero-based screen buffer, dual primary/alternate screens, and resize.

class libvt.screen.Screen
class libvt.screen.Screen

Bases: object

Mutable 2D character grid with FrozenRow RLE scrollback and reflow.

Examples

>>> term = Terminal(rows=2, cols=10)
>>> term.feed(b"line 1\r\nline 2\r\nline 3")
>>> term.screen.lines, [r.text for r in term.screen.history]
(('line 2', 'line 3'), ['line 1'])
class libvt.screen.ScreenSet
class libvt.screen.ScreenSet

Bases: object

Dual primary and alternate (?1049) screen pair.