title: Use __init__.py to modify sys path is a good idea?
body: <p>I want to ask you something that came to my mind doing some stuff.</p>
  
  <p>I have the following structure:</p>
  
  <pre><code>src
      - __init__.py
      - class1.py
      + folder2
          - __init__.py
          - class2.py
  </code></pre>
  
  <p>I class2.py I want to import class1 to use it. Obviously, I cannot use </p>
  
  <pre><code>from src.class1 import Class1
  </code></pre>
  
  <p>cause it will produce an error. A workaround that works to me is to define the following in the <code>__init__.py</code> inside <code>folder2</code>:</p>
  
  <pre><code>import sys
  sys.path.append('src')
  </code></pre>
  
  <p>My question is if this option is valid and a good idea to use or maybe there are better solutions.</p>
  
  <p><strong>Another question</strong>. Imagine that the project structure is:</p>
  
  <pre><code>src
      - __init__.py
      - class1.py
      + folder2
          - __init__.py
          - class2.py
      + errorsFolder
          - __init__.py
          - errors.py
  </code></pre>
  
  <p>In <code>class1</code>:</p>
  
  <pre><code>from errorsFolder.errors import Errors
  </code></pre>
  
  <p>this works fine. But if I try to do in <code>class2</code> which is at the same level than <code>errorsFolder</code>:</p>
  
  <pre><code>from src.errorsFolder.errors import Errors
  </code></pre>
  
  <p>It fails (<code>ImportError: No module named src.errorsFolder.errors</code>)</p>
  
  <p>Thank you in advance!</p>