selectel / pyte

Simple VTXXX-compatible linux terminal emulator
http://pyte.readthedocs.org/
GNU Lesser General Public License v3.0
649 stars 101 forks source link

Add: ByteScreen, use_c1 option #174

Open eight04 opened 5 months ago

eight04 commented 5 months ago

Fixes #118

This PR adds two features:

  1. ByteScreen - a screen that accepts any char, including unprintable/zero-width chars e.g. (\xad).
  2. A new argument ByteStream(screen, use_c1=False) - allowing us to stop parsing CSI_C1/OSC_C1 bytes so they can be piped to ByteScreen.
superbobry commented 5 months ago

Thanks @eight04!

pyte is more or less in maintenance mode, so I would much rather keep the API surface unchanged. I hope it's okay.

Looking at the diff, you should be able to keep these modifications local to your project?

eight04 commented 5 months ago

Currently I package the modified version of pyte into my app: https://github.com/eight04/ptt-mail-backup/blob/9518d2795ffb2193b1fba7bee287a7e32fd12900/cute.py#L10

Do you know any pyte alternative that accepts bytes?