readline, rlcompleter

python MrJean1 at
Wed Jan 12 02:48:00 CET 2005

There is a pretty complete (no pun intended) example in the standard
cmd module


Check file in your Python installation .../lib/pythonX.Y/,
specifically the methods Cmd.preloop() and Cmd.complete().

Another, more elaborate example is in PySH at


/Jean Brouwers

PS) A version of readline for Windows is here


michele.simionato at wrote:
> This a case where the documentation is lacking. The standard library
> documentation
> (
> this example
> try:
> import readline
> except ImportError:
> print "Module readline not available."
> else:
> import rlcompleter
> readline.parse_and_bind("tab: complete")
> but I don't find a list of recognized key bindings. For instance, can
> would like to bind shift-tab to rlcompleter, is that possible? Can I
> function keys? I did various attempt, but I did not succed :-(
> Is there any readline-guru here with some good pointers?
> Michele Simionato

More information about the Python-list mailing list