欢迎来到网页.py的文档!

内容:

入门

使用构建webapps网页.py很简单。要开始,请将以下代码保存为say, hello.py 然后用 python hello.py . 现在将浏览器指向 http://localhost:8080/ 它会用“你好,世界!”来回应你。嘿,你的第一个节目结束了网页.py-只有8行代码!

import web

urls = ("/.*", "hello")
app = web.application(urls, globals())

class hello:
    def GET(self):
        return 'Hello, world!'

if __name__ == "__main__":
    app.run()

索引和表格