Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You will lose an important disk file.


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

SubjectAuthor
* How to Add ANSI Color to User ResponseWordWeaver Evangelist
`* Re: How to Add ANSI Color to User ResponseStefan Ram
 `* Re: How to Add ANSI Color to User Responserthiebaud
  +* Re: How to Add ANSI Color to User ResponseStefan Ram
  |`- Re: How to Add ANSI Color to User ResponseStefan Ram
  `- Re: How to Add ANSI Color to User Response (Posting On Python-List Prohibited)Lawrence D'Oliveiro

1
How to Add ANSI Color to User Response

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: billkochman777@gmail.com (WordWeaver Evangelist)
Newsgroups: comp.lang.python
Subject: How to Add ANSI Color to User Response
Date: Thu, 11 Apr 2024 04:50:49 +1000
Lines: 13
Message-ID: <mailman.87.1712775067.3468.python-list@python.org>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de 7jWVBxR8bBS7beJqQPmvRg5nowTO3nAD4pA0d2FcspZQ==
Cancel-Lock: sha1:7NsJUUfybAQkjIoCHDUht3KQUFw= sha256:SKOZOM252gBcuvEXzPsEBUpJugsStv0vstz668IqEUs=
Return-Path: <billkochman777@gmail.com>
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=gmail.com header.i=@gmail.com header.b=huO5EOvf;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.092
X-Spam-Evidence: '*H*': 0.84; '*S*': 0.02; 'subject:Add': 0.04;
'ansi': 0.09; 'jython': 0.16; 'received:apple': 0.16;
'received:smtpclient.apple': 0.16; 'subject:User': 0.16;
'advance.': 0.17; 'instead': 0.17; 'to:addr:python-list': 0.20;
'input': 0.21; 'code': 0.23; 'subject:How': 0.23; 'list,': 0.24;
'there': 0.33; 'received:google.com': 0.34; 'question.': 0.35;
'following': 0.35; 'from:addr:gmail.com': 0.35; "skip:' 10": 0.37;
'way': 0.38; 'use': 0.39; 'message-id:@yahoo.com': 0.40; 'color':
0.62; 'received:202': 0.69; 'conditions': 0.70; 'skip:f 20': 0.75;
'choice': 0.76; 'subject:Color': 0.84; 'subject:Response': 0.91;
'bill': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1712775063; x=1713379863; darn=python.org;
h=to:date:message-id:subject:mime-version:disposition-notification-to
:from:from:to:cc:subject:date:message-id:reply-to;
bh=3Vt0E+CLWfWefMVCDJZ0TYiwVM/YusVL0BA13Qqrgww=;
b=huO5EOvfPKbDLtmtfJOq8s04EKd0H84QhrrIEKsQUxULQVpQpTAJvFGDexijti3sa/
mUFyRRhg9qvk5QBiLYHGkHRIQcul8NcRVfb0IxKhdvZ58ynFoIh8Qj8XczKJMuWAOvP8
PqIbgXUESPSSkAZQYhU0w37X/pYHD8pVVC9cXRfz9GYWnR3Afh/Ix1xNs+yVOTuylrAX
sI0u/RnCqvIp8MQz8GBkSQPQBGzdIx4VsFvUuGvFNgZqe4/ENPSbLPiWzoI+7Eg8leXd
24v4bi2+RzpHowKBTbIv4g7ZACzOOoDAeyPjZnj7tqn4pndOdXbSKod1pAMXoZ1utAa5
LKZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1712775063; x=1713379863;
h=to:date:message-id:subject:mime-version:disposition-notification-to
:from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=3Vt0E+CLWfWefMVCDJZ0TYiwVM/YusVL0BA13Qqrgww=;
b=UOIW520sj+mk3NOu6/QejydAMV55tqhsW2B6btyQWHwxizB7PZzoVkklFivssX2uVd
JgFE6fEvWFwuU/ZFYao8K44ZzzO9mp3F9mXWVrHS6JSzfZfROk80GHR7s1HDanAjw3n6
CWdXp41ZDqz222+a8/OCyOT8m0ugwtKTiImBN9Cjm0I5ueBzjWH/i6oKswZYXDposSVV
oUWRxwD5uRo43P1GY92O971B7bsCFTvmY4K21BlwtSSkzYbc5/9Rv6G+MRRONRwRg39o
Pfoawsx4ekEK4P/1vo/Y9L8kwvH5N8FqUz1G+o3Y4CSo8VDXQh7IJejkmnimYossKOjJ
vQgw==
X-Gm-Message-State: AOJu0YwEqrVLwzr3f1wsJjebBEDQn9LRDGdewkHyEOHrpX55F8K8egsE
hmUN7W/hn0BQaTUlO+bHZRgtvJPeW/7ZBDZk5nDXKUCaB9mN2pA51eB+5fnN
X-Google-Smtp-Source: AGHT+IH7WReTLpVy9yf/43D1rVxiFcq+2jz1mJ+VfXG0VG8qZ9i6p216lJVVXIIwQUMIt4wN/XcqHg==
X-Received: by 2002:a17:90b:8d7:b0:2a0:3dc3:8a8b with SMTP id
ds23-20020a17090b08d700b002a03dc38a8bmr3031870pjb.47.1712775063041;
Wed, 10 Apr 2024 11:51:03 -0700 (PDT)
X-Google-Original-From: WordWeaver Evangelist <wordweaverevangelist@yahoo.com>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
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: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
 by: WordWeaver Evangelis - Wed, 10 Apr 2024 18:50 UTC

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

Re: How to Add ANSI Color to User Response

<color-20240411124637@ram.dialup.fu-berlin.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response
Date: 11 Apr 2024 11:47:35 GMT
Organization: Stefan Ram
Lines: 15
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <color-20240411124637@ram.dialup.fu-berlin.de>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com> <mailman.87.1712775067.3468.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de zO89JLA8nCroGXxzJKRxiQ5dre+xosFsfX2QihoojwPr1R
Cancel-Lock: sha1:OX2+tNhC6oZqF96rbOUIX/ztz1Y= sha256:UUaNsxHK6PTZAMk8Rq7Kxv1uwvHx8PKRUgZWlaO0FPA=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Thu, 11 Apr 2024 11:47 UTC

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.

Re: How to Add ANSI Color to User Response

<uv96a0$1oq7g$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: geodandw@aol.com (rthiebaud)
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response
Date: Thu, 11 Apr 2024 13:23:12 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uv96a0$1oq7g$1@dont-email.me>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
<mailman.87.1712775067.3468.python-list@python.org>
<color-20240411124637@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 11 Apr 2024 19:23:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0c93a592a9b398dfeea3bcabad851851";
logging-data="1861872"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VEzwOF1Xb4afl8s7aDOnYI/i5YfRGRyc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:konOsWYT/R4su/ZL1m6HCw3ECIE=
Content-Language: en-US
In-Reply-To: <color-20240411124637@ram.dialup.fu-berlin.de>
 by: rthiebaud - Thu, 11 Apr 2024 17:23 UTC

On 4/11/24 07:47, Stefan Ram wrote:
> 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.

This answer seems rather insulting.

Re: How to Add ANSI Color to User Response

<insulting-20240411184338@ram.dialup.fu-berlin.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response
Date: 11 Apr 2024 17:44:35 GMT
Organization: Stefan Ram
Lines: 18
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <insulting-20240411184338@ram.dialup.fu-berlin.de>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com> <mailman.87.1712775067.3468.python-list@python.org> <color-20240411124637@ram.dialup.fu-berlin.de> <uv96a0$1oq7g$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de iPMLLxy9wC+aCLfH5CoEEQJb/iy9k13dIE41EnUvgklaLX
Cancel-Lock: sha1:+rN32gM/QzcH5YqalfJRUvWXK38= sha256:bzXEFtYZLaKiS5qHseoatMyjq9VGiJk/B6xnJpyF4EA=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Thu, 11 Apr 2024 17:44 UTC

rthiebaud <geodandw@aol.com> wrote or quoted:
>On 4/11/24 07:47, Stefan Ram wrote:
>>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.
>This answer seems rather insulting.

Could you explain how exactly you came to this conclusion?

Re: How to Add ANSI Color to User Response (Posting On Python-List Prohibited)

<uva49p$244as$4@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response (Posting On Python-List
Prohibited)
Date: Fri, 12 Apr 2024 01:55:05 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uva49p$244as$4@dont-email.me>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com>
<mailman.87.1712775067.3468.python-list@python.org>
<color-20240411124637@ram.dialup.fu-berlin.de>
<uv96a0$1oq7g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 12 Apr 2024 03:55:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c105d4bef0a9dfcc8267749d3ff10053";
logging-data="2232668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185y4unEVXTCCcVjsGWvWTY"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:FSl1mSk+dn4olhbenVNfx1ptS1w=
 by: Lawrence D'Oliv - Fri, 12 Apr 2024 01:55 UTC

On Thu, 11 Apr 2024 13:23:12 -0400, rthiebaud wrote:

> This answer seems rather insulting.

Sorry, is the Technical Support department not living up to the agreed
SLA? The refund counter is right over there.

Re: How to Add ANSI Color to User Response

<older-20240415164851@ram.dialup.fu-berlin.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: How to Add ANSI Color to User Response
Date: 15 Apr 2024 15:50:53 GMT
Organization: Stefan Ram
Lines: 24
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <older-20240415164851@ram.dialup.fu-berlin.de>
References: <E07728FE-3599-462D-B572-107C5D53C72F@yahoo.com> <mailman.87.1712775067.3468.python-list@python.org> <color-20240411124637@ram.dialup.fu-berlin.de> <uv96a0$1oq7g$1@dont-email.me> <insulting-20240411184338@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de L8Vv1m6Vk1Y/o5FcLdwKBQFIyRVi0HCGt0nma265twY2NY
Cancel-Lock: sha1:Hvs+J00pfffHvvhNDQfKxxO6rIM= sha256:R5LrYP+lF+WAx+Fipg/w4MWQvW48BeXnnTctN5JYAyQ=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Mon, 15 Apr 2024 15:50 UTC

ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
>rthiebaud <geodandw@aol.com> wrote or quoted:
>>On 4/11/24 07:47, Stefan Ram wrote:
>>>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.
>>This answer seems rather insulting.
>Could you explain how exactly you came to this conclusion?

I'm currently tinkering with different ways to express myself
in English. In my last attempt, I tried to come across like
an older person. I didn't mean to offend anyone, but going
forward I'll do my darndest to steer clear of anything that
could be perceived as an insult, as far as I can reckon.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor