Posts: 4,648
Threads: 1,495
Joined: Sep 2016
May-25-2019, 05:15 AM
(This post was last modified: May-25-2019, 05:16 AM by Skaperen.)
does anyone know of any Python code that can do the screen formatting part of terminal emulation? i need to feed it a stream like a terminal would get and periodically get an array of the screen layout.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,648
Threads: 1,495
Joined: Sep 2016
curses uses terminal type info to generate a terminal data stream that carries out the logical requests of the code that calls
curses. what i need is kinda the opposite ... take the terminal stream output as input and fill in an array of characters in the places commanded by the various escape sequences and character bytes that are being sent by whatever sends proper sequences (such as curses, but many programs do this without curses). if i do not find anything that can just do this, i will end up stripping out select code from Linux kernel source, which does this for VTs. i'm hoping for something in Python but i will do C if i must.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.