[英]Python - Google App Engine
我刚刚开始学习Google App Engine。
当我在下面输入以下代码时,我得到的只是“ Hello world!”。 我认为理想的结果是“您好,webapp世界!”
我想念什么? 我什至尝试将google framework文件夹复制到与我的应用程序相同的文件夹中。
谢谢。
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, webapp World!')
application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
准确地运行此代码不会给我所需的输出。 我怀疑你必须运行错误一些其他的代码,因为有绝对没有办法验证码给出可能可能发出你观察到的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.