[on topic] Re: readline trick needed

Peter Otten __peter__ at web.de
Tue Oct 16 06:20:33 EDT 2012


Ned Deily wrote:

> In article <k5j5sk$msb$1 at ger.gmane.org>, Peter Otten <__peter__ at web.de>
> wrote:
>> Steven D'Aprano wrote:
>> > I'm working with the readline module, and I'm trying to set a key
>> > combination to process the current command line by calling a known
>> > function, *and* enter the command line.
> [...]
>> Anyway, here's what I came up with (no warranties as it was all
>> trial-and- error):
> [...]
> 
> Keep in mind that the Python readline module may be linked to either the
> GPL-licensed GNU readline or the BSD-licensed editline (libedit) library
> (the default on newer OS X systems and probably on *BSD systems) and
> they have different command strings.  Note the warning here:
> 
> http://docs.python.org/py3k/library/readline.html

I think you are a Mac user. If so, can the snippet I posted be generalised 
to work with libedit?
 
> Or it may not be linked with either.

OK, change "no warranties" to "absolutely no warranties" ;)





More information about the Python-list mailing list