Google App Engine Python: sys.path.append not working on the Internet

I have it

import sys
sys.path.append('extra_dir')
import extra_module

It works fine under the Windows XP App Engine SDK (offline)

But when deployed on the Internet, it gives me <type 'exceptions.ImportError'>what I’m missing to deploy it on the Internet?

+1
source share
1 answer

Try the following:

sys.path.append(os.path.join(os.path.dirname(__file__), 'extra_dir'))
+9
source

All Articles