how to import the parent model on gae-python
        Posted  
        
            by zjm1126
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by zjm1126
        
        
        
        Published on 2010-06-11T03:05:35Z
        Indexed on 
            2010/06/11
            3:42 UTC
        
        
        Read the original article
        Hit count: 429
        
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
        © Stack Overflow or respective owner