[IPython-dev] looking for advice on a custom dict-like completer

Ville M. Vainio vivainio@gmail....
Tue Feb 3 13:43:20 CST 2009


On Tue, Feb 3, 2009 at 9:25 PM, Darren Dale <dsdale24@gmail.com> wrote:

> I put this at the end of my activate():
>
>     import readline
>     readline.set_completer_delims(" ")
>
>
> but it looks like that is not the right place to put it. It makes attribute
> completion work, but it breaks item completion. Where should it go?

Actually, it was the right place to put it. I tried the same and it
broke item completion for me as well. Apparently, you need ' in your
completer_delims for item completion, and it breaks attribute
completion. Oh joy.

You might want to try finding some kind of compromise from:

- magic completer_delims that will work
- returning something apart from the whole strings. E.g. the string
after the ' character. This kind of hackery was necessary for
completion of file names with spaces in them.
- Setting completer delims in your completer (!?)

-- 
Ville M. Vainio
http://tinyurl.com/vainio


More information about the IPython-dev mailing list