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

Darren Dale dsdale24@gmail....
Mon Feb 2 15:06:33 CST 2009


On Mon, Feb 2, 2009 at 8:07 AM, Ville M. Vainio <vivainio@gmail.com> wrote:

> On Sun, Feb 1, 2009 at 2:13 AM, Darren Dale <dsdale24@gmail.com> wrote:
>
> > Thank you for the advice. I've been looking at this most of the day, and
> I
> > think I'm stuck. I have an object I'm trying to navigate:
>
> > It's not clear to me how I would get the object at level_3 and then hook
> > into ipython's usual completion chain to filter attributes with leading
> > underscores, or the traits completer, for example. Is this possible?
>
> You just need to eval the whole thing, and see what attributes that
> eval'ed object has. That's what I did in ipy_greedycompleter. It's
> sort of "complete at your own risk" scheme, but it's the best thing
> you can get without putting in lots of work (and it will do what you
> want anyhow). The only work you need to do is determine how much you
> need to eval (here, it's everything before period).
>
>
Thanks for the suggestion. Once I determine how much to eval, do you know if
it is possible to hook back into the standard completer pipeline to benefit
from things like ipy_traits_completer?

Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-dev/attachments/20090202/2ac08af5/attachment.html 


More information about the IPython-dev mailing list