[IPython-user] tab completion on OSX
Fernando Perez
Fernando.Perez at colorado.edu
Fri Feb 11 11:24:43 CST 2005
John Hunter wrote:
>>>>>>"Fernando" == Fernando Perez <Fernando.Perez at colorado.edu> writes:
>
>
> Fernando> Huh? Raises are ignored, since I don't want exceptions
> Fernando> to cause noise at the tab-completion line. But a print
> Fernando> statement should definitely show up:
>
> OK, I'm a moron. I was editing the file on my linux box and testing
> over ssh on my powerbook. Duh!!!
>
> OK, the print does work. The spaces are not in the fnames returned by
> file_matches, even before the rstrip
>
> print 'matches', matches
> return [f.rstrip() for f in matches]
>
> Something downstream from that...
Well, downstream we have the complete() call. Try changing the return section
to:
try:
print 'comp:<%s>' %
self.matches[state].replace(magic_prefix,magic_escape)
return self.matches[state].replace(magic_prefix,magic_escape)
except IndexError:
return None
And see how that fares. Use this bracketed <%s> print to make sure you see
_exactly_ what is being returned, with specifically marked endpoints.
f
More information about the IPython-user
mailing list