[IPython-user] Custom command completers implemented in SVN

Ville M. Vainio vivainio at gmail.com
Wed Nov 1 15:33:43 CST 2006


On 11/1/06, Stefan van der Walt <stefan at sun.ac.za> wrote:

> ---------------------------------------------------------------------------
> 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

Thanks for the report (I'm glad I enabled the exception dumping in
completer, or this would have dropped under the radar)! I'm going to
bed now, but will examine this tomorrow as top priority.

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-user mailing list