[wingide-users] Support for _getAttributeNames in auto completion choices

Michael Foord fuzzyman at voidspace.org.uk
Thu Apr 2 10:29:06 MDT 2009


 From Python 2.6 __dir__ is the correct way to support this.

Michael

Matthew Scott wrote:
> Some packages rely on the use of dynamic attributes using the 
> __getattr__ protocol.  That is, they don't appear in the object's 
> attributes when using dir(), but they are generated on the fly when 
> requested.
>
> There is a de facto API called _getAttributeNames for providing such 
> names to tools for autocompletion when the names of those dynamic 
> attributes are 
> available: http://mail.python.org/pipermail/python-list/2001-August/100603.html
>
> It was originally introduced by PyCrust.  Since then, I know that at 
> least IPython uses this protocol.  Some projects that make use of this 
> API can be seen 
> here: http://www.google.com/codesearch?hl=en&sa=N&q=_getAttributeNames++lang:python&ct=rr&cs_r=lang:python 
> <http://www.google.com/codesearch?hl=en&sa=N&q=_getAttributeNames++lang:python&ct=rr&cs_r=lang:python>
>
> I noticed that WingIDE 3.2 beta does not support this API, at least in 
> the built-in Python shell that I was familiarizing myself with.
>
> Could support for this be added into WingIDE 3.2?
>
> Thanks!
>
> --
> Matthew Scott
> gldnspud at gmail.com <mailto:gldnspud at gmail.com>
>
> ------------------------------------------------------------------------
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide


-- 
http://www.ironpythoninaction.com/



More information about the wingide-users mailing list