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

[Question] Get direct stream of characters/special-functions/cursor-movement? #168

Open matkuki opened 11 months ago

matkuki commented 11 months ago

Hi,

Is there a possibility instead of getting a Screen object with a list of lines to display, to get a Character/special function/cursor movement output stream somehow?

In my use case with PyQt's QPlainTextEdit, it's easier to fill an editor character by character, instead of recalculating the new top point of where the newly received buffer should start. That would give the ability to the QPlainTextEdit to use it's built-in scrolling system.

I mean I tried, but it's very wonky, especially when trying to make it work on Windows and Linux. If you're off by one line height you get the wrong thing to happen, like: some lines get duplicated, lines that shouldn't be deleted get deleted, ...

Thanks