Why are you using CGI?

try with:

#!/usr/bin/env python
# -*- coding: utf-8 -*- 
import webapp2

class Handler(webapp2.RequestHandler):
    def get(self):
        self.response.out.write("Hello from my simple App")

app = webapp2.WSGIApplication([('/', Handler)], debug=True)
    



El viernes, 15 de junio de 2012 22:47:22 UTC-5, bhcuong2008 escribió:
>
> Hi,
>
> here is my simple app, but does not work
>
> test.py:
> ===
> #!/usr/bin/env python
> from wsgiref.handlers import CGIHandler
>
> def simple_app(environ, start_response):
>     "Simplest possible application object"
>     status = '200 OK'
>     response_headers = [('Content-type','text/plain')]
>     start_response(status, response_headers)
>     return ['Hello from CGI Handler!\n']
>
> CGIHandler().run(simple_app)
> ===
>
> Output when run dev_appserver:
> ===
> Traceback (most recent call last):
>   File "/opt/appengine/google_appengine/google/appengine/runtime/wsgi.py", 
> line 193, in Handle
>     result = handler(dict(self._environ), self._StartResponse)
> TypeError: 'module' object is not callable
> ===
>
> Please help me.
>
> Thanks,
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/UUc_jg3_ffoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to