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
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
where AppOne.py, AppTwo.py and AppThree.py imports the modules a, b and c in the Core package.
I don't understand how to write the __init__.py files and the import statements. I have read
http://docs.python.org/tutorial/modules.html and http://guide.python-distribute.org/creation.html. I got errors like "Attempted relative import in non-package" or "Invalid Sintaxis"
__init__.py) empty and it will work. you only need to put something there if you have particular special requirements (ie want to hide things).