Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <mailman.89.1712785425.3468.python-list@python.org>
Deutsch   English   Français   Italiano  
<mailman.89.1712785425.3468.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: dn <PythonList@DancesWithMice.info>
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response
Date: Thu, 11 Apr 2024 09:43:37 +1200
Organization: DWM
Lines: 18
Message-ID: <mailman.89.1712785425.3468.python-list@python.org>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
 <0edb314f-9859-4876-ba1e-befb5a6f1da2@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de gpkiv0KQkUf4CkMkZaGpygvNWz27a9mXj+GZND1/MM2A==
Cancel-Lock: sha1:DxtrFWKkuPM9k64bYUCs5C9EB5A= sha256:3tY9seezvktpKg85KBIKUDGgRNGpfdAae8I9dsspPXU=
Return-Path: <PythonList@DancesWithMice.info>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=danceswithmice.info header.i=@danceswithmice.info
 header.b=RiGjleac; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Add': 0.04; 'mar':
 0.07; '=dn': 0.09; 'ansi': 0.09; 'from:addr:danceswithmice.info':
 0.09; 'from:addr:pythonlist': 0.09; 'terminal': 0.09; '2024':
 0.16; 'jython': 0.16; 'message-id:@DancesWithMice.info': 0.16;
 'received:51.254': 0.16; 'received:51.254.211': 0.16;
 'received:51.254.211.219': 0.16; 'received:cloud': 0.16;
 'received:rangi.cloud': 0.16; 'subject:User': 0.16; 'url-
 ip:75.2/16': 0.16; 'url-ip:75/8': 0.16; 'wrote:': 0.16; 'python':
 0.16; 'advance.': 0.17; 'instead': 0.17; 'to:addr:python-list':
 0.20; 'input': 0.21; 'code': 0.23; 'subject:How': 0.23; 'tried':
 0.26; 'header:User-Agent:1': 0.30; 'header:Organization:1': 0.31;
 'python-list': 0.32; 'but': 0.32; 'there': 0.33; 'header:In-Reply-
 To:1': 0.34; 'question.': 0.35; 'following': 0.35; "skip:' 10":
 0.37; 'using': 0.37; 'received:192.168': 0.37; 'way': 0.38;
 'text': 0.39; 'use': 0.39; 'define': 0.40; 'url-ip:99/8': 0.61;
 'color': 0.62; 'received:51': 0.64; 'well': 0.65; 'conditions':
 0.70; 'skip:f 20': 0.75; '....': 0.76; 'choice': 0.76;
 'subject:Color': 0.84; 'subject:Response': 0.91; 'bill': 0.95
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud 062EA240D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
 s=staff; t=1712785422;
 bh=ju51CLFjEnDMkH+LIAXF2sbvjXg8wRYOTeld+ccTvwQ=;
 h=Date:From:Subject:To:References:In-Reply-To:From;
 b=RiGjleac0jAuRryFwxrwc30vKXvZnBCosUDoIEinUgYOa9OmC2IupSFZsdUNHOmpv
 JGI0mHAoYgr/7gW0KTeDT8G62SwcOfmUVASeqxIje9tCPX1SGNKjyudxYaF+R89D/C
 020s3CwzAccc3dp/Ekv8nWO+PqutlQOWD4b80Sb4nCuWjjMpLK4q3NwHWw95I1CkpG
 VMmxv4p9DDiM5ueelY8d9Uk+BaVoyqJfOf+K6dCNRSzj5H1J5Avar4W44GnbAg0g5c
 MvLrsTg9D8JG6Cfir8tHlfZCqJSoLmwRJItAQsWZFJVZDcQeEuN3ZsJuDM+XHIRLEN
 fLuhgvfLp3DGA==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <0edb314f-9859-4876-ba1e-befb5a6f1da2@DancesWithMice.info>
X-Mailman-Original-References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
Bytes: 4609

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

Haven't tried using any of theses techniques, but may define input() 
color, as well as print():-

How to print colored terminal text in Python
MAR 06, 2024
....
https://byby.dev/py-print-colored-terminal-text

-- 
Regards =dn