web.py

image

import web 没有报错,说明安装成功.

image

import web
urls = (
    ‘/(.*)’, ‘hello’
)
app = web.application(urls, globals())

class hello:       
    def GET(self, name):
        if not name:
            name = ‘World’
        return ‘Hello, ‘ + name + ‘!’

if __name__ == “__main__”:
    app.run()

 

运行脚本.环境搭建成功.

image

image

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注