how to import the parent model on gae-python
- by zjm1126
main:.
+-a
¦ +-__init__.py
¦ +-aa.py
+-b
¦ +-__init__.py
¦ +-bb.py
+-cc.py
if i am in aa.py , how to import cc.py ?
this is my code ,but it is error :
from main import cc
what should i do .
thanks
updated
in normal python file (not on gae),i can use this code :
import os,sys
dirname=os.path.dirname
path=os.path.join(dirname(dirname(__file__)))
sys.path.insert(0,path)
import cc
print cc.c
but on gae , it show error :
ImportError: No module named cc