[PyQt] problem with importing a SIP module

Phil Thompson phil at riverbankcomputing.com
Mon Oct 25 19:41:48 BST 2010


On Mon, 25 Oct 2010 10:11:43 -0700, Qin Shen <jeanshen at tippett.com> wrote:
> Hi there,
> 
> I am having trouble with importing a SIP module. Here is my "B.sip"
file:
> 
> --------------------------------------------
> %Module B 0
> 
> %Import A.sip
> 
> %Include classB1.sip
> %Include classB2.sip
> --------------------------------------------
> 
> The classes in module B are derived from classes in module A.
> 
> The sip-generated c++ code compiled without any problem. But after I 
> imported
> module B into python, dir(B) shows nothing defined in module A

Anything in A.sip will be implemented in module A, not module B.

> or 
> anything defined
> in "classB1.sip" or "classB2.sip". So basically module B has nothing in
it.
> 
> ----------------------------------------
>  >>> import B
>  >>> dir(B)
> ['__doc__', '__file__', '__name__', '__package__']
> ----------------------------------------
> 
> Did I miss anything?

You haven't provided enough information to say.

Phil


More information about the PyQt mailing list