我在 python 中运行了以下 hello world 代码,但 localhost:8080 不打印任何内容
我正在使用 ubuntu 12.04
localhost:8080 显示一个空白页面
你好世界.py
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, World!')
application = webapp2.WSGIApplication([
('/', MainPage),
], debug=True)
应用程序.yaml
application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.application
输出如下
kiran@kiru-Lenovo-G480:~/google$ dev_appserver.py helloworld/
INFO 2013-10-09 12:22:03,559 sdk_update_checker.py:245] Checking for updates to the SDK.
INFO 2013-10-09 12:22:03,565 __init__.py:94] Connecting through tunnel to: appengine.google.com:443
INFO 2013-10-09 12:22:03,571 sdk_update_checker.py:261] Update check failed: <urlopen error Tunnel connection failed: 407 Proxy Authentication Required>
INFO 2013-10-09 12:22:03,595 api_server.py:138] Starting API server at: http://localhost:44748
INFO 2013-10-09 12:22:03,610 dispatcher.py:168] Starting module "default" running at: http://localhost:8080
INFO 2013-10-09 12:22:03,614 admin_server.py:117] Starting admin server at: http://localhost:8000