[PyKDE] Win32 success! & Now SIP problems

Phil Thompson phil at riverbankcomputing.co.uk
Wed Nov 24 09:21:42 GMT 2004


>
> I finally got win32 success. It is a tricky bit, but its easy in
> retrospect.
>
>
>
> Now my issue is that the SIP dll can't stand to be entered twice by the
> program.
>
>
>
> For instance :
>
>
>
> Loop:
>
> Py_Initialize()
>
> PyRun_SimpleString('Import qt')  #imports SIP
>
> Py_Finalize()
>
>
>
> On the 2nd time around the program crashes in SIP
>
>
>
> Is there anyway SIP can be fixed, or can I forcibly unload it?

SIP can't be fixed because it does some irreversible initialisation.
Taking Py_Initialize() and Py_Finalize() out of the loop should work. As
with any module, there is no problem with importing sip may times.

Phil




More information about the PyQt mailing list