Completer

A base class for completers.

Child classes should implement the completelist method.


Attributes

a text

None

a delims

'\t\n'

Methods

f __init__(self) ...

f complete(self, text, state) ...

The actual completion method

This method is not meant to be overridden. Override the completelist method instead. It will make your life much easier.

For more detail see documentation for readline.set_completer

f completelist(text) ...

Returns a list.

The list contains a series of strings which are the suggestions for the given string text. It is valid to have no suggestions (empty list returned).

See the source for more information.