Thanks so much, Phil! It works now. I never would have thought about
the reason why it didn't work.
Thanks a lot for looking into it!
-Jean
Phil Thompson wrote:
On Tue, 26 Oct 2010 12:46:28 -0700, Qin Shen <[email protected]> wrote:
Hi Phil,
It looks like the problem I'm having is caused by the namespace.
After removing the namespace, %Import works just fine. But We do
need to keep the namespace in our project. What do I need to do
to make it work?
It is working...
SIP implements a C++ namespace as a single Python class - in this case
A.SG.
It does not implement it as a separate class in each module. In other
words, in this case, it does not implement it as A.SG and B.SG.
When the B module is imported the contents of the SG namespace that it
implements are added to the SG class in the A module.
Your testB.py will work if you replace...
from B import *
...to...
import B
from A import SG
(Actually it doesn't matter what the order of these two lines are.)
I admit that all this isn't very obvious, and I might not do it this way
if I was doing it today.
Phil
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt