[IPython-user] win32com tab completion?
Fernando Perez
Fernando.Perez at colorado.edu
Thu Jan 26 13:08:11 CST 2006
Matt Wilkie wrote:
>>Try dir(gp). That's what tab-completion uses: if an object doesn't publish
>>its interface, it's really hard for tab-completion to find out about its
>>internals. Tab-completion is limited to what dir(foo) will return.
>
>
> ah, I'm nix'd then. Oh, well couldn't hurt to ask. Now I guess I go
> hunting upstream to get gp to publish the interface.
Yup. The problem is that objects may choose to define arbitrarily complex
__getattr__ methods which look up internally held attributes, so that
foo.bar
is valid, even though 'bar' is nowhere to be found in dir(foo). Since there
is no way, a priori, to know whether foo.bar will succeed or not, tab
completion has to operate on _some_ list of known quantities.
Cheers,
f
More information about the IPython-user
mailing list