Skip to main content

A tty for Textual UIs

Project description

textual-tty

A pure Python terminal emulator for Textual apps, that aims for tmux compatibility.

Currently lacks a cursor, any decent debugging tools, and is too chatty, but it's still somewhat usable.

Demo

uvx textual-tty

Usage

There's 3 main classes:

  1. Terminal, a standalone terminal that doesn't need Textual.
  2. TextualTerminal, a tty widget subclass.
  3. TerminalApp, a terminal emulator in a window.

Read the demo code for more info.

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.

todo / ideas

  • debug logger
    • make file logging optional
    • add arg parser to demo app
  • break terminal project out from Textual deps
    • pick a snazzy name
    • stdio -> pty wrapper
    • gui
      • make framebuffer.py
      • choose a backend
    • asciinema streaming -> terminal web
  • performance improvements
    • rewrite using ANSI buffer grid
    • parse with regex over large buffer sizes
    • lazily draw the outputs, render to Rich at the last moment
  • scrollback buffer
    • rewrite app so we have consistent + performant buffer class
    • scrollbar support when used
  • bugs
    • blank background to end of line
      • Move away from rich
    • corruption in stream
    • scroll region: scroll up in vim corrupts outside scroll region
  • testing
    • move tests
      • integration ./tests/integration
      • comparison scripts ./tests/integration/scripts
      • performance ./test/performance
    • more coverage
    • performance counters
  • reduce redundancy redundancy of repeated repeated code code
    • code code of of redundancy redundancy
  • add terminal visuals
    • mouse cursor (disabled by default)
    • bell flash effect (enabled in base class, disabled in textual_terminal)
  • Theme support
    • base terminal using config + themes
    • textual widget using CSS styles
    • textual app using theme/css loader
  • flesh out terminal app
    • multiple tabs
    • settings panel
      • bell: system [Y/n], title bar [y/N], flash [y/N]
      • mouse: display [y/N]
      • wide chars detection
      • theme selector/editor

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.1.0.tar.gz (33.1 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.1.0-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textual_tty-0.1.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for textual_tty-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6275fdd811dc850ebe594cc18d499a98541a791ad7bef0e34b26727a22130850
MD5 5976851e741068456c8db84742669151
BLAKE2b-256 bdbdb67edadd36d7f0cd8f646c0c0b7650a4f1fa042be7513e9a8b7fc690b439

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textual_tty-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for textual_tty-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54c40c2873d77c9e68cbe5fe0d9ba3b40575990bc8dbc266656d8b4341a49742
MD5 4b71d16af0ab557d30bd7d0339d563c9
BLAKE2b-256 5b43f3f0ccd9b934793c3060d86e3949150db6523551ed4b287887f92050b924

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