[PyKDE] Importing sip-generated module into multiple interpreters

Phil Thompson phil at riverbankcomputing.co.uk
Fri Sep 2 15:52:55 BST 2005


On Friday 02 September 2005 3:41 pm, Nigel Stewart wrote:
> > SIP modules should work with multiple interpreters (though it's not
> > something I test), but (any) module initialisation can only be done once
> > per process - not once per interpreter.
>
> Phil,
>
> Is there a sip or Python C API way to import
> the module into the second interpreter, without
> calling initmodule()?

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.

Phil




More information about the PyQt mailing list