title: Import module from subfolder
body: <p>I want to import subfolders as modules. Therefore every subfolder contains a <code>__init__.py</code>. My folder structure is like this:</p>
  
  <pre><code>src\
    main.py
    dirFoo\
      __init__.py
      foofactory.py
      dirFoo1\
        __init__.py
        foo1.py
      dirFoo2\
        __init__.py
        foo2.py
  </code></pre>
  
  <p>In my main script I import</p>
  
  <pre><code>from dirFoo.foofactory import FooFactory
  </code></pre>
  
  <p>In this factory file I include the sub modules:</p>
  
  <pre><code>from dirFoo1.foo1 import Foo1
  from dirFoo2.foo2 import Foo2
  </code></pre>
  
  <p>If I call my foofactory I get the error, that python can't import the submodules foo1 and foo2:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/tmp/src/main.py", line 1, in &lt;module&gt;
  from dirFoo.foofactory import FooFactory
    File "/Users/tmp/src/dirFoo/foofactory.py", line 1, in    &lt;module&gt;
  from dirFoo1.foo1 import Foo1
      ImportError: No module named dirFoo1.foo1
  </code></pre>