Re: How to Add ANSI Color to User Response

2024-04-13 Thread Pierre Fortin via Python-list
On Thu, 11 Apr 2024 05:00:32 +0200 Gisle Vanem via Python-list wrote: >Pierre Fortin wrote: > >> Over the years, I've tried different mechanisms for applying colors until >> I got my hands on f-stings; then I created a tiny module with all the >> colors (cR, cG, etc) which made my life so much

Re: How to Add ANSI Color to User Response

2024-04-12 Thread Gisle Vanem via Python-list
Pierre Fortin wrote: Over the years, I've tried different mechanisms for applying colors until I got my hands on f-stings; then I created a tiny module with all the colors (cR, cG, etc) which made my life so much simpler (attached). Attachments are stripped off in this list. It would be nice

Re: How to Add ANSI Color to User Response

2024-04-11 Thread Cameron Simpson via Python-list
On 10Apr2024 23:41, Alan Gauld wrote: Normally, for any kind of fancy terminal work, I'd say use curses. My problem with curses is that it takes over the whole terminal - you need to manage everything from that point on. Great if you want it (eg some full-terminal tool like `top`) but

Re: How to Add ANSI Color to User Response

2024-04-11 Thread Thomas Passin via Python-list
On 4/10/2024 6:41 PM, Alan Gauld via Python-list 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,

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Grant Edwards via Python-list
On 2024-04-10, Alan Gauld via Python-list 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, >>

Re: How to Add ANSI Color to User Response

2024-04-10 Thread David via Python-list
On Wed, 10 Apr 2024 at 18:51, WordWeaver Evangelist via Python-list wrote: > I have a simple question. I use the following textPrompt in some of my > Jython modules: > '\n [1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, > forceUppercase=True) > Is there a way to add an

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Pierre Fortin via Python-list
On Thu, 11 Apr 2024 04:50:49 +1000 WordWeaver Evangelist via Python-list wrote: >Hello List, > >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

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Alan Gauld via Python-list
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

Re: How to Add ANSI Color to User Response

2024-04-10 Thread dn via Python-list
On 11/04/24 06: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

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Grant Edwards via Python-list
On 2024-04-10, 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