Re: Terminal Emulator

Liste des GroupesRevenir à cl python 
Sujet : Re: Terminal Emulator
De : hjp-python (at) *nospam* hjp.at (Peter J. Holzer)
Groupes : comp.lang.python
Date : 18. May 2024, 17:08:43
Autres entêtes
Message-ID : <mailman.15.1716045388.2909.python-list@python.org>
References : 1 2 3 4
Pièces jointes : signature.asc (application/pgp-signature)
On 2024-05-14 16:03:33 -0400, Grant Edwards via Python-list wrote:
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.

And if you want to go for a superset, xterm might be one of the more
useful: https://www.xfree86.org/current/ctlseqs.html

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.

Right. A saner model than ANSI and its supersets might be a good idea
conceptionally. But I'd expect quite a few programs to break.


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...

Yup. Also there aren't many programs which use, e.g. xterm's
pixel-graphics capabilities.

OTOH, there is something like domterm[1], which can (theoretically)
display anything a browser can display.

        hp


[1] https://domterm.org/index.html

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"


Date Sujet#  Auteur
18 May 24 o Re: Terminal Emulator1Peter J. Holzer

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal