Skip to main content

a pure python tty

Project description

bittty

A pure Python terminal emulator.

Almost usable; some scroll region problems, doesn't like textual in textual yet.

Demo

Run the standalone demo:

python ./demo/terminal.py

Or use the textual demo to see it in a TUI:

uvx textual-tty

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.

Recent changes

  • 🪟 tests run on Windows runner
  • 📉 added parser benchmarking and tui graphs
  • 🐌 use regex for parsing to speed things up a tad (~2x faster)
  • 📚 document half a billion DEC private modes we don't support
  • 🔙 DECLM - allow \n to act like \r\n so we don't have to rely on cooked input on the pty when using as a library.
  • 🖼️ DEC Special Graphics
  • 🐌 Faster colour/style parser
  • ⛓️‍💥 Split out from textual-tty into separate package

bugs / todo

  • SIGWINCH handler atomicity + buffer resizes
  • architecture - pretty big
  • gui
    • make a terminal input class, for standalone input
    • make framebuffer.py
    • choose a display driver
  • performance improvements
    • reconsider CSI end char approach
    • line cache for outputs
    • [.] revisit colours / styles
  • scrollback buffer
    • implement logloglog for scrollback with wrapping
  • bugs
    • corruption in stream - debug it - utf8 split on boundary
    • scroll region: scroll up in vim corrupts outside scroll region
  • add terminal overlay visuals
    • bell flash effect
    • make cursor an overlay
    • make mouse an overlay
    • debug overlay for scroll regions
  • Support themes
  • bittty-specific escape sequences
    • visible mouse on / off
    • debugging info
    • record
    • list sequences + values
  • Document all the escape sequences
    • collect books for a terminal library

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

bittty-0.0.10.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

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

bittty-0.0.10-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file bittty-0.0.10.tar.gz.

File metadata

  • Download URL: bittty-0.0.10.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for bittty-0.0.10.tar.gz
Algorithm Hash digest
SHA256 15d2b22561a0d4b8228589d30752eda7844b15f668c9ed6d9695fc85c6e1b815
MD5 fe3beabbafefeefc9f56147d6aec3f78
BLAKE2b-256 ccdbead4ff52b85af8aca0386936ed0d53ac5e60acca385271399dcbe07f6a34

See more details on using hashes here.

File details

Details for the file bittty-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: bittty-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for bittty-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 359db6ace0212d1afa2242330f4cc1fb2bf3bede5f1209223aa36d89e9d035f6
MD5 1ed59b78ea7fa3380a7ffb272d0b5830
BLAKE2b-256 983527a12ccbf31a199e7002dcef0df79547c342f41371e0cd2ca145c404143d

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