Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
terminal emulation
#1
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.
Reply
#2
curses: https://docs.python.org/3/howto/curses.html
Reply
#3
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.
Reply
#4
Sorry, wrong thread.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020