Re: How to Add ANSI Color to User Response

Liste des GroupesRevenir à cl python 
Sujet : Re: How to Add ANSI Color to User Response
De : grant.b.edwards (at) *nospam* gmail.com (Grant Edwards)
Groupes : comp.lang.python
Date : 11. Apr 2024, 03:37:31
Autres entêtes
Message-ID : <mailman.93.1712803053.3468.python-list@python.org>
References : 1 2 3
User-Agent : slrn/1.0.3 (Linux)
On 2024-04-10, Alan Gauld via Python-list <python-list@python.org> wrote:
On 10/04/2024 19:50, WordWeaver Evangelist via Python-list wrote:
>
I have a simple question. I use the following textPrompt in some of my Jython modules:
 '\nYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, forceUppercase=True)
Is there a way to add an ANSI color code to the end
>
Normally, for any kind of fancy terminal work, I'd say use curses.

If you want to use the terminal escape sequences provided by terminfo
and ncurses, but don't want to use the ncurses windowing functions,
here are some notes on how to do that:

    https://github.com/GrantEdwards/Python-curses-and-terminfo

That too is C-Python oriented, and I don't really know how to do the
same things using Jython.

--
Grant


Date Sujet#  Auteur
11 Apr 24 o Re: How to Add ANSI Color to User Response1Grant Edwards

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal