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

<pre><code>&gt;main_path/  
    __init__.py  
    config/  
        __init__.py  
        common.py  
    app_1/  
        __init__.py  
        config.py  
        index.py
&gt; 
</code></pre>

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

<pre><code>&gt;from main_path.config import common
&gt; 
</code></pre>

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

<pre><code>&gt; $&gt; pwd
..../main_path/app_1  
$&gt; python index.py
[...]  
ImportError: No module named main_path.config
&gt; 
</code></pre>

<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>
