Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Wernher von Braun settled for a V-2 when he coulda had a V-8.


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

SubjectAuthor
o Re: Baffled by readline moduleGrant Edwards

1
Re: Baffled by readline module

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: grant.b....@gmail.com (Grant Edwards)
Newsgroups: comp.lang.python
Subject: Re: Baffled by readline module
Date: Fri, 10 Mar 2023 06:37:56 -0800 (PST)
Lines: 23
Message-ID: <mailman.2257.1678459079.20444.python-list@python.org>
References: <640a3318.020a0220.67dbd.001a@mx.google.com> 4MB586445FB9FC0FB1327A1CA00B9BA9@SJ0PR14MB5864.namprd14.pro
d.outlook.com>
<640b40c4.920a0220.da552.0107@mx.google.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de ATvfT0ttpVHfjzlfhKVh0AtU2D7biVl1WHzNSbD/a4rw==
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=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=PduXKcsf;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.086
X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; '(e.g.': 0.05;
'subject:module': 0.07; 'etc.).': 0.09; 'module:': 0.09;
'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards':
0.16; 'modules,': 0.16; 'recall': 0.16; 'wrote:': 0.16; 'grant':
0.17; 'to:addr:python-list': 0.20; 'input': 0.21; 'command': 0.23;
'header:User-Agent:1': 0.30; 'module': 0.31; "doesn't": 0.32;
'but': 0.32; "i'll": 0.33; 'there': 0.33; 'received:google.com':
0.34; 'one.': 0.35; 'received:209.85.166': 0.35;
'from:addr:gmail.com': 0.35; 'couple': 0.37; 'really': 0.37;
'received:209.85': 0.37; 'others': 0.37; 'received:209': 0.39;
'use': 0.39; 'provide': 0.60; 'remember': 0.61; 'forward': 0.62;
'daily': 0.65; 'back': 0.67; 'right': 0.68; 'above,': 0.70;
'left': 0.83; 'editing': 0.84; 'editing.': 0.84; 'inherit': 0.84;
'say,': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20210112; t=1678459077;
h=to:content-transfer-encoding:mime-version:user-agent:references
:subject:from:date:message-id:from:to:cc:subject:date:message-id
:reply-to; bh=iD0oU02Poquv9nvJWzRmO1bEobeZewFMt1NDYb0YWsI=;
b=PduXKcsf6pGKfhhL26R88sANN1rNLmYjpfiC6ygasWJgYSCkChnVyyTgl+SHRbGGwF
xt5q6SXVRvAQA+fJhnse8HslJGCg1zu6OeIS/IR53Qs2I43ICqyGzWuEPn+SUYsAYHM1
xZ9aUHl/krd1nYG/pjNYOpdla4maD4QLg+BKiZUN6FRtGZ1qFd9wmkgBxHoImG54b3dm
82SgGAgUqddi1NsoArmp81B5+SLTkYAhGxEAE8rFj8pWhL5IMTyCO7qwYCJvQoHgk8Vz
cQTziI98LhKfHQ/nJypFBXSdZTW4Nue/jsDPvbdt8orHQcP22gCNnVKxUFISK+mPYVn2
ySVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112; t=1678459077;
h=to:content-transfer-encoding:mime-version:user-agent:references
:subject:from:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=iD0oU02Poquv9nvJWzRmO1bEobeZewFMt1NDYb0YWsI=;
b=DjWRTJesqi4Y0/jt12L2Zm6K88YSernKajWbbLYq5s2WZVyhYxCUqufspS+BPkBY/0
lXfEQWsNDQbrJY7VcpYNcyoeIJojha04YhVcXsv/ML/xFy8uOjAlxGyaqocmJMSKWnQD
sU3mxLvJZQ8v9x5t1b0ZaWgZKNH55JPc4Znp7JDnOPWOwbreniZG/G/Km99hkekXjXH1
vWQWx+k12bj/9k0dk8lsV180PHX8ZfY4rlReKr2Ckna8KTcvgCxxfJwRU13KWe/XY4pD
RsskRPR0nllhZprl9M1C8w2GKMQW0if7f65HMKEIHRSD2WdtbUEYXqpT+ecfJPoTpljX
oJBA==
X-Gm-Message-State: AO0yUKUumQI05vF7qot4aFPVENSqd6PFc6PCVM20ogr1plyePcDN4Yre
U3F0FcWmIwlkGbYu9nfOkTy8IHVuvGc/xg==
X-Google-Smtp-Source: AK7set+OCucX1M4uTUNSw/2S96gE91tbKlJX4Qm7sjiyt6SzhQQu9wvsXT+KORx0Hc/Kg0g81iHNig==
X-Received: by 2002:a92:b512:0:b0:316:b0bb:3d99 with SMTP id
f18-20020a92b512000000b00316b0bb3d99mr14734224ile.22.1678459077420;
Fri, 10 Mar 2023 06:37:57 -0800 (PST)
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: <640b40c4.920a0220.da552.0107@mx.google.com>
X-Mailman-Original-References: <640a3318.020a0220.67dbd.001a@mx.google.com>
4MB586445FB9FC0FB1327A1CA00B9BA9@SJ0PR14MB5864.namprd14.pro
d.outlook.com>
 by: Grant Edwards - Fri, 10 Mar 2023 14:37 UTC

On 2023-03-10, Weatherby,Gerard <gweatherby@uchc.edu> wrote:

> I would say, “No, readline is not the right tool.”
>
> cmd.Cmd is: https://docs.python.org/3/library/cmd.html. I have a
> couple of cmd.Cmd modules, one of which I use daily and the other
> weekly.

I'll have to remember that one. It doesn't really fit my current use
case, but there are others where it would work nicely.

However, cmd.Cmd does not provide command recall and
editing. According to the page above, that's provided by the readline
module:

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

--
Grant

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor