How to Add ANSI Color to User Response

WordWeaver Evangelist billkochman777 at gmail.com
Wed Apr 10 14:50:49 EDT 2024


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 way to add an ANSI color code to the end where the conditions are, so that the color of the user’s input is of a color of my choosing, instead of just white?
Thank you very much in advance.
Kind regards,
Bill Kochman


More information about the Python-list mailing list