Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

It is the theory which decides what can be observed. -- Albert Einstein


devel / comp.lang.python / Re: How to Add ANSI Color to User Response

SubjectAuthor
o Re: How to Add ANSI Color to User ResponseGrant Edwards

1
Re: How to Add ANSI Color to User Response

<mailman.88.1712778802.3468.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=29834&group=comp.lang.python#29834

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: grant.b.edwards@gmail.com (Grant Edwards)
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response
Date: Wed, 10 Apr 2024 15:53:20 -0400 (EDT)
Lines: 21
Message-ID: <mailman.88.1712778802.3468.python-list@python.org>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
<4VFD5r6ZpKznV1q@mail.python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de ktT6RSFlZ3X3uZd8AUWtBw0TIkc+EQ6uH2ffo8Z3KncQ==
Cancel-Lock: sha1:GlpzgOgMKI7v3R0yf1ZNp6woJWU= sha256:w2BpC/ZKsXkhAmzxj831LyA3vRbgmjoClYTGzGvcRLA=
Return-Path: <grant.b.edwards@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.039
X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject:Add': 0.04;
'string': 0.07; 'ansi': 0.09; 'meant': 0.09;
'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards':
0.16; 'jython': 0.16; 'subject:User': 0.16; 'wrote:': 0.16;
'grant': 0.17; 'instead': 0.17; 'to:addr:python-list': 0.20;
'input': 0.21; 'code': 0.23; 'subject:How': 0.23; 'header:User-
Agent:1': 0.30; 'python-list': 0.32; "i'm": 0.33; 'there': 0.33;
'"the': 0.35; 'question.': 0.35; 'following': 0.35;
'from:addr:gmail.com': 0.35; "skip:' 10": 0.37; 'way': 0.38;
'put': 0.38; 'use': 0.39; 'to.': 0.39; 'color': 0.62; 'message-
id:invalid': 0.68; 'refers': 0.69; 'sequence': 0.69; 'conditions':
0.70; 'skip:f 20': 0.75; 'choice': 0.76; 'subject:Color': 0.84;
'subject:Response': 0.91
User-Agent: slrn/1.0.3 (Linux)
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: <4VFD5r6ZpKznV1q@mail.python.org>
X-Mailman-Original-References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
 by: Grant Edwards - Wed, 10 Apr 2024 19:53 UTC

On 2024-04-10, WordWeaver Evangelist via Python-list <python-list@python.org> 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?

I'm not sure what is meant by "the end where the conditions are", nor
do I know what "textPrompt" refers to.

Are you asking how to put a second escape sequence at the end of the
string literal after the colon?

--
Grant

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor