importing from parent directory
<p>I have this kind of path architecture :  </p>

<blockquote>
  <p>main_path/<br>
  --------------/<code>__init__</code>.py<br>
  --------------/config/<br>
  -----------------------/<code>__init__</code>.py<br>
  ----------------------/common.py<br>
  --------------/app_1/<br>
  -----------------------/<code>__init__</code>.py<br>
  -----------------------/config.py<br>
  -----------------------/index.py</p>
</blockquote>

<p>I'd like to be able to do so in config.py :  </p>

<blockquote>
  <p>from main_path.config import common  </p>
</blockquote>

<p>Though it does not work. Python tells me : </p>

<blockquote>
  <p>$> pwd<br>
  ..../main_path/app_1<br>
  $> python index.py<br>
  [...]<br>
  ImportError: No module named main_path.config</p>
</blockquote>

<p>As far as I understand, this would be possible if i loaded everything up from the main_path, though the aim is to have multiple apps with a common config file.<br>
I tried to add the parent directory to the <code>__path__</code> in the app_1/<code>__init__</code>.py but it changed nothing.</p>

<p>My next move would be to have a symbolic link, though I don't really like this "solution", so if you have any idea to help me out, this would be much appreciated !</p>

<p>Thanks in advance !</p>
