title: import modules from sibling folder
body: <p>I have a python project in a repository that needs to import some classes from other repositories.
  Since they are different repositories they need to stay at the same directory level.</p>
  
  <p>A folder structure like:</p>
  
  <pre><code>repos
      |- my_project 
           |- main.py
      |- foo_folder
           |- foo.py
      |- bar_folder
           |- bar.py
  </code></pre>
  
  <p>In <code>myproject/main.py</code> I need to import the class <code>Foo_Class</code> from <code>foo_folder/foo.py</code> and <code>Bar_Class</code> from <code>bar_folder/bar.py</code>.</p>
  
  <p>One way of doing so is:</p>
  
  <pre><code>import sys
  sys.path.insert(0, '../foo_folder')
  sys.path.insert(0, '../bar_folder')
  </code></pre>
  
  <p>then I can do</p>
  
  <pre><code>from foo_folder.foo import Foo_Class
  from bar_folder.bar import Bar_Class
  </code></pre>
  
  <p>But I'm not a particular fan of this solution and also it's not PEP8 compilant:</p>
  
  <pre><code>PEP8: module level import not at top of file
  </code></pre>
  
  <hr>
  
  <p>I could also create inside my_project a shortcut to foo and a shortcut to bar, so the system will see those modules as subfolders.</p>
  
  <p>However this again looks like a hack, I'll have to add this shortcuts to <code>.gitignore</code> and in Windows it doesn't work at all!</p>
  
  <p>I don't know why but if I physically copy foo folder and name it <code>copy_of_foo_folder</code> I can then import it, but if I made a shortcut to foo I cannot import.</p>
  
  <pre><code> |- my_project 
               |- shortcut_to_foo_folder
               |- copy_of_foo_folder
               |- main.py
  
  from copy_of_foo_folder.foo import Foo   # WORKS
  from shortcut_to_foo_folder.foo import Foo   # FAILS
  
  ModuleNotFoundError: No module named 'shortcut_to_foo_folder'
  </code></pre>
  
  <hr>
  
  <p>So my question is. What is the standard way of importing modules that are not in a subfolder but at the same hierarchy level?</p>