I have two interface files:
%module(package = "pkg") System
%module(package = "pkg") UserInterface
This is then wrapped by swig something like
class System: ....
As you can clearly see, the System module will override
the System class. So when doing
classInstance = pkg.UserInterface.System()
this fails, because pkg.UserInterface.System points to
pkg.System and not the desired class. One workaround
would be to do something like
in the UserInterface.py file. So swig should not import
only by module name, but also use the surrounding
package name to avoid name clashes as the one above.
Log in to post a comment.