I am trying to import a file in python
my directory structure is
maindir
    __init__.py
    constants.py
    subdirectory
          __init__.py
          code.py
I am trying to import constants in the code file
import sys
sys.path.append('/home/ching/maindir')
from maindir import constants
even after that I am getting this error
ImportError: No module named maindir
Any one got any idea whats wrong?