[IPython-dev] requesting guidance with a custom completer for a dictionary-like object
Darren Dale
dsdale24 at gmail.com
Sun Dec 14 18:07:35 EST 2008
Hello,
I am working on a custom completer for h5py, which provides a nice interface
to hdf5 files with a dictionary-style interface. I would like to enable tab
completion for these h5py objects (which share a common ancestor called
_DictCompat), but I am testing with regular dictionaries.
If I have:
d={'a':{'b':1},'b':2}
I can currently do:
d['<tab>
and get
a b
if I do:
d['a<tab>
I would like to get:
d['a']
but I get
d['a'
and then if I do
d['a'<tab>
I get
d['a'a
Also, it is common to have deeply nested hierarchies with h5py, so I would
like to be able to do:
d['a'].<tab>
or
d['a']['<tab>
I think I remember hearing that IPython used to do tab completion of
dict-like objects, but the feature was removed because it was causing
problems with user code. I was hoping someone might remember how this could
be done, and could provide some guidance.
Thanks,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20081214/ac427981/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipy_h5py_completer.py
Type: text/x-python
Size: 1615 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20081214/ac427981/attachment.py>
More information about the IPython-dev
mailing list