[PyKDE] Importing sip-generated module into multiple interpreters

Phil Thompson phil at riverbankcomputing.co.uk
Wed Sep 7 08:26:35 BST 2005


>> If you use the Python API to import the module then the init function
>> will
>> only be called once, no matter how many times it is imported. You were
>> calling the init function explicitly.
>
> 	We prefer to link our module statically, rather than
> 	as a .pyd, that's why we rely on the explicit init.
> 	We would prefer to leave things this way, but
> 	we'll do some experiments to avoid the explicit
> 	initialisation.

I don't see why static linking should make a difference. (Without checking
the Python source) a statically linked module still has to be imported and
Python will only call it's init function once.

Phil




More information about the PyQt mailing list