[PyKDE] dir(QtObjectThing) -> give_me_all_attrs(QtObjectThing)?

Phil Thompson phil at riverbankcomputing.co.uk
Thu May 29 19:48:00 BST 2003


On Wednesday 28 May 2003 6:37 pm, Kasper Souren wrote:
> Hi,
>
> I wonder whether there is a simple trick to get all the existing
> attributes? Now a dir(QtObjectThing) just gives a very limited number of
> attributes. When exploring PyQy (and PyQwt) it would be a great help when
> there was a simple way to just see the possible methods. Without resorting
> to the manual, that is ;)  When working in Python I usually just hack
> around and use my TAB key a lot (in order to get possible completions).
>
> Once an object's method is used it does appear in dir(the_object). So I
> hope there is a possibility to have a little function that could 'trigger'
> the possible attributes...
>
> Having this automatically would be even cooler, but I guess that that would
> already have been done if it were easy... And, I hope not but, maybe the
> same counts for the little hackish function I have in mind.

I'm afraid it's a feature. Without this feature PyQt would take too long to 
load and take up too much memory.

Phil




More information about the PyQt mailing list