In article <[email protected]>, Peter Otten <[email protected]>
wrote:
> Ned Deily wrote:
> > 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?
Isn't it hairy enough??
Here's how to make tab complete work with both; it gives an idea of the
libedit commands:
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else: # GNU readline format
readline.parse_and_bind("tab: complete")
The documentation of the command syntax is in the .editrc man pages, for
example:
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/M
anPages/man5/editrc.5.html
> > Or it may not be linked with either.
> OK, change "no warranties" to "absolutely no warranties" ;)
Good idea.
--
Ned Deily,
[email protected]
--
http://mail.python.org/mailman/listinfo/python-list