title: Function from imported swig wrapped module not found
body: <p>I want to create several Python modules from SWIG-wrapped C++ classes.
  The problem is that modules cannot import each other.</p>
  
  <p>here is A_module.i file</p>
  
  <pre><code>%module A_module
  %inline
  %{
      void foo(){}
  %}
  </code></pre>
  
  <p>it compiles without problem, thus in .py script I can do something like this:</p>
  
  <pre><code>import A_module
  A_module.foo()
  </code></pre>
  
  <p>Now I want to create B_module that import A_module and calls foo.
  Here is B_module.i file</p>
  
  <pre><code>%module B_module
  %import A_module.i
  </code></pre>
  
  <p>When I do something like this in .py</p>
  
  <pre><code>import B_module
  B_module.foo()
  </code></pre>
  
  <p>It gives an error syaing module has no attribute foo.</p>
  
  <p>The solution I've found is to use %include instead of import, but it creates same foo function in both modules, which I would like to avoid</p>