How to write a python package
<p>I am trying to refactor my code (a bunch of core modules and some apps living in a common directory).
I want to get this structure</p>

<pre class="lang-none prettyprint-override"><code>Root
   __init__.py
   Core
       __init__.py
       a.py
       b.py
       c.py
   AppOne
       __init__.py
       AppOne.py
   AppTwo
       __init__.py
       AppTwo.py
   AppThree
       __init__.py
       AppThree.py
</code></pre>

<p>where <code>AppOne.py</code>, <code>AppTwo.py</code> and <code>AppThree.py</code> imports the modules <code>a</code>, <code>b</code> and <code>c</code> in the <code>Core</code> package.</p>

<p>I don't understand how to write the <code>__init__.py</code> files and the import statements. I have read
<a href="http://docs.python.org/tutorial/modules.html" rel="nofollow">http://docs.python.org/tutorial/modules.html</a> and <a href="http://guide.python-distribute.org/creation.html" rel="nofollow">http://guide.python-distribute.org/creation.html</a>. I got errors like "Attempted relative import in non-package" or "Invalid Sintaxis"</p>
