import web
urls = ('/','index')
app = web.application(urls,globals())
class index:
def GET(self):
greeting = 'hello word'
return greeting
if __name__ == "__main__":
app.run()
urls = ('/','index') 中index到底是class index的index吗?
可如果我换成这样,照样运行啊?
class homepage:
def GET(self):
greeting = 'hello word'
return greeting
1
RIcter 2015-05-10 15:31:48 +08:00
_(:3」∠)_
是那个 index 没错.. |
2
redhatping OP 楼上,但是我改成class homepage: 一样可以运行啊?
|
3
RIcter 2015-05-10 16:43:50 +08:00
@redhatping 你 ctrl-c 重新运行。
|
5
Livid MOD |