[PyQt] Sip problem with module import

Phil Thompson phil at riverbankcomputing.com
Mon Feb 14 22:39:55 GMT 2011


On Mon, 14 Feb 2011 14:35:42 +0100, Sébastien Petitdemange
<sebastien.petitdemange at esrf.fr> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi All,
> 
> I'm trying to port to Windows platform some sip module we previously
> used with Linux.
> There is two modules one depend of the other:
> 	- module A and
> 	- module B import module A.
> 
> My problem is that when I import those two module, I've got a RunTime
> exception in Python.
> i.e:
> 
> import A
> import B  #It's generate the following exception
> 
> RuntimeError: the sip module has already registered a module called A
> 
> Those import work perfectly with Linux platform!
> Is there an extra keyword to add into sip file or a work around...

SIP generates the same code for all platforms (given the same .sip file
and the same command line flags).

Phil


More information about the PyQt mailing list