[Python-ideas] History stepping in interactive session?

Steven D'Aprano steve at pearwood.info
Tue Oct 9 05:11:09 CEST 2012

On Mon, Oct 08, 2012 at 05:12:24PM +0900, Stephen J. Turnbull wrote:
> Andy Buckley writes:
>  > So one last question, in case it is an acceptable python-ideas topic:
>  > how about adding readline-like support by default in the
>  > interpreter?
> If readline-like support is available on the system, it's used.
> However, it's apparently only readline-like.  For example, on Mac OS
> X, the BSD-licensed libedit readline emulation is used by default, it
> appears.  I wouldn't expect full functionality there.
> On GNU/Linux systems, as I wrote, True GNU readline is used.  Why this
> particular function isn't bound or doesn't work right, I don't know
> offhand.  It is apparently a bug (my Python sources are from April,
> but I can't see why this would change), since the sources say
> (ll. 927-931 of Modules/readline.c):

I thought so too, but apparently the behaviour being talked about is a 
bash extension to readline. Adding it to Python would be a feature 
request, not a bug fix.

While it's a useful feature, I think that it's probably something which 
can distinguish the vanilla Python interactive interpreter from more 
advanced environments like iPython, which apparently already has it.


More information about the Python-ideas mailing list