[IPython-user] Custom command completers implemented in SVN
Stefan van der Walt
stefan at sun.ac.za
Wed Nov 1 09:01:34 CST 2006
On Wed, Nov 01, 2006 at 03:16:20PM +0200, Stefan van der Walt wrote:
> On Wed, Nov 01, 2006 at 03:05:57PM +0200, Ville M. Vainio wrote:
> > On 11/1/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> >
> > >I am running the latest ipython trunk on a standard Ubuntu Edgy
> > >installation, with no modifications to the default ipythonrc and a
> > >stock standard /etc/inputrc.
> > >
> > >Any idea where I start looking for the problem?
> >
> > This is probably a difference b/w pyreadline (windows) and treadline
> > (Linux). I gotta try it on Linux as well. ISTR that on linux, you
> > didn't actually need to press backspace and erase the quote but could
> > keep on typing letters as if the quote wasn't there.
Some more strange behaviour in the new completer -- on my machine, at
least, it won't run under emacs:
- emacs /tmp/blah.py
- C-c !
- At the ipython prompt, type 'import time'
and then
time.a<TAB><TAB>
which results in
---------------------------------------------------------------------------
exceptions.IndexError Traceback (most recent call last)
/home/stefan/lib/python2.4/site-packages/IPython/completer.py in complete(self=<IPython.completer.IPCompleter instance>, text='time.a', state=0)
583 text = os.path.expanduser(text)
584 if state == 0:
--> 585 custom_res = self.dispatch_custom_completer(text)
custom_res = undefined
self.dispatch_custom_completer = <bound method IPCompleter.dispatch_custom_completer of <IPython.completer.IPCompleter instance at 0xb7b1b76c>>
text = 'time.a'
586 if custom_res is not None:
587 # did custom completers produce something?
/home/stefan/lib/python2.4/site-packages/IPython/completer.py in dispatch_custom_completer(self=<IPython.completer.IPCompleter instance>, text='N.a')
536 event.line = line
537 event.symbol = text
--> 538 cmd = line.split(None,1)[0]
cmd = undefined
line.split = <built-in method split of str object at 0xb7e11098>
global None = undefined
539 event.command = cmd
540 for c in itertools.chain(
IndexError: list index out of range
Cheers
Stéfan
More information about the IPython-user
mailing list