terminalio
– Displays text in a TileGrid
The terminalio
module contains classes to display a character stream on a display. The built
in font is available as terminalio.FONT
.
Note
This module does not give access to the REPL.
Available on these boards
- terminalio.FONT: fontio.BuiltinFont
The built in font
- class terminalio.Terminal(scroll_area: displayio.TileGrid, font: fontio.BuiltinFont, *, status_bar: displayio.TileGrid | None = None)
Display a character stream with a TileGrid
ASCII control: *
\r
- Move cursor to column 1 *\n
- Move cursor down a row *\b
- Move cursor left one if possibleOSC control sequences: *
ESC ] 0; <s> ESC \
- Set title bar to <s> *ESC ] ####; <s> ESC \
- IgnoredVT100 control sequences: *
ESC [ K
- Clear the remainder of the line *ESC [ #### D
- Move the cursor to the left by #### *ESC [ 2 J
- Erase the entire display *ESC [ nnnn ; mmmm H
- Move the cursor to mmmm, nnnn.Terminal manages tile indices and cursor position based on VT100 commands. The font should be a
fontio.BuiltinFont
and the TileGrid’s bitmap should match the font’s bitmap.- write(buf: circuitpython_typing.ReadableBuffer) int | None
Write the buffer of bytes to the bus.
- Returns:
the number of bytes written
- Return type:
int or None