Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

God requireth not a uniformity of religion. -- Roger Williams


devel / comp.lang.python / Re: Baffled by readline module

SubjectAuthor
o Re: Baffled by readline moduleCameron Simpson

1
Re: Baffled by readline module

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: cs...@cskk.id.au (Cameron Simpson)
Newsgroups: comp.lang.python
Subject: Re: Baffled by readline module
Date: Sat, 11 Mar 2023 07:51:17 +1100
Lines: 28
Message-ID: <mailman.2263.1678486392.20444.python-list@python.org>
References: <640b6509.020a0220.2b13.05db@mx.google.com>
<ZAuYRVI+xonSUQ1D@cskk.homeip.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de eleL2CFgHQgattSabssgpgTK+CuRFrD0QIdqs+l5NA6A==
Return-Path: <cameron@cskk.id.au>
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.012
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(e.g.': 0.05;
'subject:module': 0.07; 'wrong.': 0.07; 'anyway,': 0.09; 'etc.).':
0.09; 'linux': 0.09; 'cheers,': 0.11; '"is': 0.16; 'box.': 0.16;
'cameron': 0.16; 'from:addr:cs': 0.16; 'from:addr:cskk.id.au':
0.16; 'from:name:cameron simpson': 0.16; 'importing': 0.16;
'message-id:@cskk.homeip.net': 0.16; 'received:10.10': 0.16;
'says:': 0.16; 'simpson': 0.16; 'wrote:': 0.16; 'python': 0.16;
'grant': 0.17; 'to:addr:python-list': 0.20; 'input': 0.21; "i've":
0.22; 'maybe': 0.22; 'thinking': 0.28; 'header:User-Agent:1':
0.30; 'module': 0.31; 'wondering': 0.31; "doesn't": 0.32; 'header
:In-Reply-To:1': 0.34; '"if': 0.35; 'system,': 0.36; 'author':
0.37; 'way': 0.38; 'read': 0.38; 'use': 0.39; 'here.': 0.61;
"there's": 0.61; 'forward': 0.62; 'i\xe2\x80\x99ve': 0.62; 'our':
0.64; 'skip:t 40': 0.64; 'received:userid': 0.66; 'back': 0.67;
'header:Received:6': 0.67; 'right': 0.68; 'received:172.16': 0.76;
'left': 0.83; 'editing': 0.84; 'inherit': 0.84; 'received:119':
0.84; 'meets': 0.91
X-RG-Spam: Unknown
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvhedrvddukedgudegtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfupfevtfgpvffgnffuvffttedpqfgfvfenuceurghilhhouhhtmecugedttdenucenucfjughrpeffhffvuffkgggtugfgjggffhesthekredttderjeenucfhrhhomhepvegrmhgvrhhonhcuufhimhhpshhonhcuoegtshestghskhhkrdhiugdrrghuqeenucggtffrrghtthgvrhhnpeektdejheekfedtveevieetkeefledukefgveeltdffteeugefgtddtgeevgedvjeenucfkphepudduledruddvrddvudekrddvtdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepsghorhhgrdgtshhkkhdrhhhomhgvihhprdhnvghtpdhinhgvthepudduledruddvrddvudekrddvtdefpdhmrghilhhfrhhomheptggrmhgvrhhonhestghskhhkrdhiugdrrghupdhnsggprhgtphhtthhopedupdhrtghpthhtohepphihthhhohhnqdhlihhsthesphihthhhohhnrdhorhhgpdhrvghvkffrpeduudelqdduvddqvddukedqvddtfedrugihnhgrmhhitgdrihhpshhtrghrrghushdrtghomhdprghuthhhpghushgvrheptghskhhksegsihhgphhonhgurdgtohhmpdhgvghokffrpeetfgdpoffvtefjohhsthepnhhsshhtlhhrghdutdhpqdhsvhgt
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-RG-VS-CLASS: clean
X-Authentication-Info: Submitted using ID cskk@bigpond.com
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <640b6509.020a0220.2b13.05db@mx.google.com>
User-Agent: Mutt/2.2.7 (2022-08-07)
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: <ZAuYRVI+xonSUQ1D@cskk.homeip.net>
X-Mailman-Original-References: <640b6509.020a0220.2b13.05db@mx.google.com>
 by: Cameron Simpson - Fri, 10 Mar 2023 20:51 UTC

On 10Mar2023 09:12, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>On 2023-03-10, Weatherby,Gerard <gweatherby@uchc.edu> wrote:
>> On our Linux systems, I can up-arrow to go back to prior commands
>> and use the left and right arrows to navigate a line. The
>> functionality may be provided internally by readline. I’ve never had
>> to dig into it because it meets my needs out of the box.
>
>Apparently the cmd.Cmd docs are wrong. It says:
>
> If the readline module is loaded, input will automatically
> inherit bash-like history-list editing (e.g. Control-P scrolls
> back to the last command, Control-N forward to the next one,
> Control-F moves the cursor to the right non-destructively,
> Control-B moves the cursor to the left non-destructively, etc.).
>
>On my Python 3.10.10 Linux system, cmd.Com itself is importing the
>readline module unconditionally when I call cmdloop(). There's no 'if'
>about it.

I was wondering about that myself, whether this is an accident of
phrasing. It doesn't say "is imported", so maybe the author was thinking
"if readline's part of the install" here.

Anyway, I've got a try/import-readline/except-importerror/pass in my
cmd.Cmd wrapper, because I read this the way you read it.

Cheers,
Cameron Simpson <cs@cskk.id.au>

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor