pyrepl-0.6

Michael Hudson mwh at python.net
Tue Nov 27 08:01:28 EST 2001


Michael Hudson <mwh at python.net> writes:

> Fernando Pérez <fperez528 at yahoo.com> writes:
> 
> > Michael Hudson wrote:
> > 
> > [pyrepl]
> > > I have a new version sat on my irritatingly
> > > internet-disconnected home box which I'll release as soon as I
> > > remember to stick it on a floppy and bring it in to the
> > > department.
> 
> Argh!  Tomorrow, maybe.

And so it was (except it was a CD-R not a floopy and I forgot how to
drive mkisofs and had to fiddle file names when I got it here and ...)

Here's the new README:

This is pyrepl 0.6, a readline-a-like for Python, which seems to be
being released on 2001-11-27.

    http://starship.python.net/crew/mwh/hacks/pyrepl.html

It requires python 2.1 (or newer) with the curses and termios modules
built, and features (in less than 3000 lines of code):

 * sane multi-line editing
 * history, with incremental search
 * completion, including displaying of available options
 * a fairly large subset of the readline emacs-mode keybindings
   (adding more is mostly just a matter of typing)
 * a liberal, Python-style, license
 * a new python top-level
 * no global variables, so you can run two or more independent readers
   without having their histories interfering.
 * generally speaking, a much more interactive experience than readline
   (it's a bit like a cross between readline and emacs's mini-buffer)

There are probably still a few little bugs & misfeatures, but _I_ like
it, and use it as my python top-level most of the time.

To get a feel for it, type:

$ python pyrepl.py

One point that may confuse: because the arrow keys are used to move up
and down in the command currently being edited, you need to use ^P and
^N to move through the history.

Please direct comments to mwh at python.net.

(If you've released open source software you'll know how frustrating
it is to see a couple of hundred downloads and only get a handful of
emails, so don't think I'll be irritated by the banality of your
comments!)

New since 0.5.1:
 + Rewrote the low level code to be (hopefully) more portable and
   (certainly) clearer.  Most of the code from 0.5.1 is still present,
   but it's been moved around and refactored (and the names have
   gotten more sensible).
 + The above process fixed a fair few bugs.
 + Implemented a few more emacs-mode bindings.
 + Nailed another couple of differences between my top-level and the
   the default one, including playing nice with Tk.
 + Implemented a saner way of handling window resizes (a sane way of 
   handling signals!  Call the Unix police!)
 + minimal testing on cygwin.

New since 0.5.0:
 + Realizing that it wasn't going to run under 2.0 after all, I ripped
   out some of the 2.0 compatibility code.

Planned "at some point in the future":
 - vi-mode
 - GUI toolkit friendliness (done for tk)
 - point-and-mark?
 - undo support (0.5.1 had some undo support, but it didn't really 
   work, and 0.6.0 has none)
 - user customization support (maybe even try to read $INPUTRC?)
 - non-incremental history search?  (prolly not worth it)
 - a more incremental way of updating the screen.

An announcement will find it's way on to clpa & the usual Parnassus
thing will happen soon.

Enjoy!

M.

-- 
6. Symmetry is a complexity-reducing concept (co-routines include
   subroutines); seek it everywhere.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html



More information about the Python-list mailing list