Thanks, exactly what I was looking for. I should go and buy you book ;-) Bernd
Fredrik Lundh wrote: > "Bernd" wrote: > > >>I'm on a Linux env and try to get >>word completion form sdtin done, >>like Perl's >> $stdin = Complete( "\t: ", @choices ); >> >>What I have so far shows me the directory listing >>on the second hit on TAB and not the list of >>choices on the first like I wanted to have. > > > your completer function is called with a prefix and an index. for each > completion request, readline will call this function repeatedly, with in- > creasing indices. for each call, you should return the corresponding > match, or None if there are no more matches. > > the second example on this page might help: > > http://effbot.org/librarybook/readline.htm > > </F> > > > -- http://mail.python.org/mailman/listinfo/python-list