From: Ken Watford <kwatford+<swig@gm...> - 2010-07-27 16:57:47
For a multi-package Python project I'm working on, I decided that the
SWIG-generated modules within each package would just be called "api"
(with the package attribute set as appropriate).
One such module needed some base classes from another, so I added an
%import as usual. The generated Python code
then included the appropriate import statement.
However, in the Python class definition, the foreign class was
referenced with no module qualification. Naturally, this did not work.
Renaming the modules so that they had unique names resolved the issue,
so it looks like whatever code decides whether to
qualify the base class names doesn't take the package into account.
(Using SWIG 2.0.0, Python 2.6, directors enabled. The subclass had two
bases, one from the current module.)