[PyKDE] PyQt C API

Giovanni Bajo rasky at develer.com
Tue Oct 18 08:54:13 BST 2005


Toby Dickenson <tdickenson at devmail.geminidataloggers.co.uk> wrote:

> I am considering translating a few functions of our large PyQt
> application to C (or, probably, pyrex) as a performance optimisation,
> but I have stumbled at the first hurdle. How do you convert a
> PyObject pointer to a PyQt object into a pointer to the Qt C++ object?


I don't think it is possible. I also think that the performance sensitive parts
shouldn't have anything to do with PyQt in the first place. We use Pyrex
exactly for this purpose, but the parts we optimize are far far far from the
package which imports and uses PyQt. I'm failry positive that, even if your
application is not well decoupled, you can still isolate the performance
sensitive algorithms in functions which have nothing to do with PyQt.

Giovanni Bajo




More information about the PyQt mailing list