Giovanni Bajo wrote: > Phil Thompson <[EMAIL PROTECTED]> wrote: > >> 1. Changing the API isn't acceptable, "import qttable" must continue >> to work. > > I tried adding qttable.py which simply contained "from qt import *". I > found out that the main breakage still happens because, since qt contains > all the symbols, people just import qt and forget about importing the > other modules. This is something which can't be "manually" cured. Surely > SIP could create a "qt.py" wrapper around qt.pyd which imports only the > symbols originally contained in qtmod, but you can see that I couldn't do > this manually :)
There's one possible solution for that. There will be some breakage but in a controlled way. Instead of generating a file called qt.pyd, generate a file qtstatic.pyd and import it like that in the main script : import qtstatic qtstatic.initialize() The function initialize can either create all the qt top modules, or maybe it can add an import hook which will then override all the qt imports and make them work as expected. Well, you get the idea I bet :) Once the static qt version is initialized, all the standard qt code should work. _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
