[Python-ideas] A better interactive prompt

Paul Moore p.f.moore at gmail.com
Thu Oct 27 05:35:32 EDT 2016


On 27 October 2016 at 01:49, Steven D'Aprano <steve at pearwood.info> wrote:
>> (a bit like readline,
>> but I dislike the way you can't switch off readline integration if
>> it's installed)?
>
> This comment surprises me. To me, that's like saying "I dislike the way
> you can't switch off breathing" -- readline is almost indispensible. The
> REPL experience without line editing (apart from backspace) and history
> is *horrible*. Why would you want to switch it off?

The Windows default command line editing experience is a lot better
(IMO) than the (non-readline) Unix default, and it's common throughout
all interactive prompts (Python's REPL included). As a result, when
readline is installed (pyreadline on Windows, which used to be needed
for IPython) it disrupts the "normal" editing experience. It's
possible that with a bit of configuration and practice I could get
used to the readline experience, but then I get a different experience
when in a venv where I don't have pyreadline installed.

The idea that simply having a module called "readline" available,
changes the REPL behaviour, with no way to configure that, seems
incredibly hostile to me. Of course it's arguably pyreadline's fault
for reusing a stdlib name, but nevertheless it's not something I agree
with.

Paul


More information about the Python-ideas mailing list