Skip to main content

A tty for Textual UIs

Project description

textual-tty

A terminal emulator for Textual apps, using bittty, my pure Python terminal emulator.

Terminals in your terminal: draggable, resizable windows running real ptys.

Demo

uvx textual-tty

Usage

from textual_tty import Terminal, TerminalWindow, Window

# A terminal as a plain widget: composes a bittty Board, never subclasses it.
yield Terminal(command="htop")

# Or in a draggable, resizable window that closes when the process exits.
yield TerminalWindow(command=["vim", "README.md"])

Terminal speaks the whole seam: bracketed paste, OSC palette/title/cwd/ clipboard/notifications, DECSCUSR cursor shapes, synchronized output, mouse reporting with drag-selection when the child isn't tracking, OSC 8 links (ctrl+click opens), and XTWINOPS — a child can move, raise, and resize its own window. Discrete events arrive as Textual messages; anything deeper is on terminal.board (the bittty emulator). Window is a bare-bones draggable/resizable window you can use for other things too.

Read the demo code (textual_tty/demo.py) for a working app.

Links

License

WTFPL with one additional clause

  1. Don't blame me

Do wtf you want, but don't blame me when it rips a hole in your trousers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_tty-0.4.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_tty-0.4.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file textual_tty-0.4.0.tar.gz.

File metadata

  • Download URL: textual_tty-0.4.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for textual_tty-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4ec0922bc01a1452c5d9036c0713305587a8a2f52f3b38582ed2d78ab9278804
MD5 fc33a5c54f6e2a3e20b510a885495fc4
BLAKE2b-256 fd7f3f0685a8f1d5502a79b8e964959397a233ce7909cae89fe314216e5f6c76

See more details on using hashes here.

File details

Details for the file textual_tty-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: textual_tty-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for textual_tty-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dba7766c97a5df5a73689b781e80eacd1048ca905948089c8f6e2e82c1f0275
MD5 5bca8af02723e367130e2f0b1ed64464
BLAKE2b-256 5048312a3f6190730ecb4fa341a4e4219ffe1552bb9007637c4db980afc05242

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page