Phil, can you please confirm whether you will implement any such debugging aids in the SIP API (I take it there is nothing at the moment)? I could really use some introspection abilities into SIP when things don't work as expected, as happens from time to time. This should save me a lot of frustration .. Arve
On Tue, Jul 28, 2009 at 4:53 PM, Arve Knudsen <[email protected]>wrote: > I can confirm that the reason was a build inconsistency (wrong version SIP > header being included). As such, some debugging help from SIP could probably > have saved me some time (and next time something like this happens). For > instance, maybe one could adjust SIP's loglevel so it would output error > messages when an incompatible PyQt is loaded (or whatever goes wrong here). > > Arve > > > On Tue, Jul 28, 2009 at 4:17 PM, Arve Knudsen <[email protected]>wrote: > >> On Tue, Jul 28, 2009 at 4:12 PM, Phil Thompson < >> [email protected]> wrote: >> >>> On Tue, 28 Jul 2009 16:03:05 +0200, Arve Knudsen <[email protected] >>> > >>> wrote: >>> > On Tue, Jul 28, 2009 at 3:53 PM, Phil Thompson >>> > <[email protected]>wrote: >>> > >>> >> On Tue, 28 Jul 2009 15:38:09 +0200, Arve Knudsen >>> <[email protected]> >>> >> wrote: >>> >> > Hi >>> >> > >>> >> > Are there any good troubleshooting techniques when unable to get a >>> type >>> >> > definition from the SIP API? Sometimes, when there are >>> inconsistencies >>> >> > in >>> >> > my >>> >> > build I am unable to get the type definition for QWidget, and I >>> waste >>> a >>> >> lot >>> >> > of time trying to find out what's gone wrong. If SIP itself could >>> give >>> >> > me >>> >> > some useful info wrt. to its state, I'm sure that could save me a >>> great >>> >> > deal >>> >> > of time. >>> >> >>> >> I don't know what you mean by its state. >>> >> >>> >> QWidget's type definition is a static data structure - >>> sipType_QWidget. >>> >> You >>> >> don't get it, you just reference it. >>> > >>> > >>> > This is from an application embedding Python, so I'm calling SIP's C >>> API. >>> > In this case I have no choice but to go via the API right? >>> >>> Right. >>> >>> > What I do is >>> > call >>> > api_find_type("QWidget"), which in this case returns NULL. >>> >>> I would think the most likely thing in that case is that the QtGui module >>> hasn't been imported. >> >> >> It has been imported, and like I said this code works for certain builds. >> It is indicative of inconsistent builds that it doesn't work, and it would >> be great to have some debugging aids. >> >> Arve >> >> >
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
