Fwd: Fwd: [PyKDE] Qt objects subclasses and __dict__ copies

Daniele Varrazzo daniele.varrazzo at gmail.com
Tue Mar 21 22:32:58 GMT 2006


On a related topic, Edward Loper reported:

-------- Original Message --------
Subject: Introspection of qt classes

It appears that all classes in the Python "qt" module lie about what
module they come from:

 >>> import qt
 >>> qt.QUrl.__module__
'__main__'

As a result, programs that use introspection to learn about them can get
 confused.  In particular, if the following module is given to epydoc
[1], then it generates documentation for every class in qt, and includes
it in the output:

    from qt import *
    def f():
        """
        This function *should* be the only thing described in the
        output by epydoc.
        """

Any chance this could get fixed?  Just changing the string "__main__" to
 "qt" in your c source at the right point(s) should do the trick.

-Edward

p.s., I looked for a bug tracker, but didn't find one; hopefully this is
 the right place to ask.  Please cc me on any response, since I'm not
subscribed to this list.

[1] http://epydoc.sourceforge.net/




More information about the PyQt mailing list