[PyKDE] PyQt + multiple Interpreters

Christoph Wiedemann wiedeman at gmx.net
Thu Sep 16 14:32:48 BST 2004


Sorry for answering my own mail. I've just tried my suggested fix, but now i
get 

exceptions.RuntimeError: SIP - module "qt" implements QObject but it has
already been implemented
  File "<string>", line 47, in getWidget

  File "./PyCute.py", line 3, in ?
    from qt import *

  File "/home/wiedeman/.used/lib/python2.3/qt.py", line 939, in ?
    libqtc.sipRegisterClasses()

Looks like there are more static variables which influence PyQt / Sip. I'd
appreciate any suggestions ... Thanks in advance.

Christoph


> Hi all,
> 
> i think i found a bug in sipRegisterModule(...). I'm using Sip 3.8. I have
> a
> program which uses embedded python. It allocates several independent
> interpreters with Py_NewInterpreter.
> 
> Now, if more than one interpreter imports the qt module, the program hangs
> in an endless loop inside siplib.c/findClass(...). This is because the
> modulesList->md_next is pointing to modulesList.
> 
> I suggest to change sipRegisterModule to insert the module to be
> registered
> only, if it isn't already in modulesList.
> 
> Christoph
> 
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
> 




More information about the PyQt mailing list