Python Forum

Full Version: terminal emulation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
Sorry, wrong thread.