[Patches] [Patch #102891] Alternative readline module

Michael Hudson mwh21@cam.ac.uk
17 Jan 2001 00:09:58 +0000


This is a really silly place to be having this discussion, isn't it?
Oh well.  I might create an sf project when sf isn't broken any
more...

Guido van Rossum <guido@python.org> writes:

> > Although pyrl is not nearly ready for the prime time, I think the
> > general approach is a good one long term.  Command line editing
> > is not a performance critical task.  Python code is fast enough.
> > Moving this task to Python should allow the editor to be made
> > cross platform more easily.
> 
> Sadly, this isn't the case -- pyrl uses curses and/or termios calls
> that are highly Unix specific. :-)

Actually one could probably rewrite the bottom layer to use /F's
Console library without too much sweat.  Currently my code is also
highly tty dependent - it dies horribly if you try to use it inside
emacs, for example.

> > Also, it should be easier to add
> > more advanced features.  I would like the editor to work like the
> > Z shell editor in that you can edit whole blocks.  For example,
> > if I enter:
> > 
> >     for i in range(10):
> >         print i
> > 
> > and press up arrow I would be able to edit the whole for loop as
> > a block.

This works in pyrl today!  It was, in fact, one of my main motivations
for writing pyrl.

> Just use IDLE -- it has all that.  Character cell interfaces aren't
> worth the effort of keeping up.

Well, I like them, and if I'm prepared to put the effort into writing
one, that's all it takes, isn't it?  I don't necessarily expect people
to understand me...

Cheers,
M.