Sujet : Re: How to Add ANSI Color to User Response
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 11. Apr 2024, 13:47:35
Autres entêtes
Organisation : Stefan Ram
Message-ID : <color-20240411124637@ram.dialup.fu-berlin.de>
References : 1 2
WordWeaver Evangelist <
billkochman777@gmail.com> wrote or quoted:
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?
Now sonny, I ain't gonna give you a straight answer to your question,
but let me tell you what I know. You Windows users out there would
do well to look into that there "colorama" Python module! It'll help
you cook up them fancy ANSI escape sequences to get some color goin'
on in your Windows command prompt (or maybe even cross-platform).
Now, I can't rightly say if that's still needed these days or
if the new-fangled consoles even require it anymore. But if
you're hankerin' to add a little pizzazz to your text, that
colorama gizmo might just do the trick.