Sujet : Re: Terminal Emulator
De : grant.b.edwards (at) *nospam* gmail.com (Grant Edwards)
Groupes : comp.lang.pythonDate : 14. May 2024, 21:03:33
Autres entêtes
Message-ID : <mailman.2.1715717014.2909.python-list@python.org>
References : 1 2 3
User-Agent : slrn/1.0.3 (Linux)
On 2024-05-14, Alan Gauld via Python-list <
python-list@python.org> wrote:
On 14/05/2024 18:44, Gordinator via Python-list wrote:
>
I wish to write a terminal emulator in Python. I am a fairly
competent Python user, and I wish to try a new project idea. What
references can I use when writing my terminal emulator? I wish for
it to be a true terminal emulator as well, not just a Tk text
widget or something like that.
>
The first thing is to decide which terminal.
If you want to make life easier, make it a superset of a terminal that
already exists in the terminfo database.
Going with some sort of ANSI terminal will probably provide
operability even with dumb apps which ignore $TERM and just spit out
basic ANSI escape sequences.
If you really want to break trail, you could invent your own control
sequences, which means you'll have to write terminfo and/or termcap
entries as well as the terminal emulator.
A VT100 is very different from a 3270. And even a VT330 is quite
different from a VT100 although sharing a common subset of control
codes. And if you start looking at graphical terminals things get
even more interesting!
"Intersting" is putting it mildly...