import os
import sys

def fix_path():
    sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))

def main():
    url_map = [('/', views.IndexHandler)]
app = webapp.WSGIApplication(url_map, debug=False)
wsgiref.handlers.CGIHandler().run(app)
if __name__ == '__main__':
    fix_path()
main()
How to import modules in Google App Engine?