Skip to main content

a pure python tty

Project description

bittty

A pure Python terminal emulator.

Currently buggy and a bit slow, but it's still somewhat usable.

Demo

Run the standalone demo:

python ./demo/terminal.py

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

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

  • split pty out into a cross platform package
  • break terminal project out from Textual deps
    • write a minimal demo that doesn't need textual
    • gui
      • make framebuffer.py
      • choose a backend
  • performance improvements
    • parse with regex over large buffer sizes
  • scrollback buffer
    • implement logloglog for scrollback with wrapping
  • bugs
    • blank background to end of line
    • corruption in stream - debug it
    • scroll region: scroll up in vim corrupts outside scroll region
  • reduce redundancy redundancy of repeated repeated code code
    • code code of of redundancy redundancy
  • add terminal visuals
    • bell flash effect
  • Support themes

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.1.tar.gz (25.8 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.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bittty-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ff40c6c9c981d40e9ceff808067612bace2ef26ce18fb2e25014d1fb93eb8241
MD5 00efc046b4a663ef9f40fb2b436db745
BLAKE2b-256 02cd757c0303ec2181328e74e8f1241415f5cddb4d15a740b80be82c85d1a568

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bittty-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8435dcf758b151dddd60dfd684d60997cc907bcce3e97fa079cccb1e16e5880c
MD5 782d5e5fb29432cd125b984174b19a07
BLAKE2b-256 dc30e12c8a17a087245a8102011707e592de6df51f23df9cdf4603d123f61a19

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