python web使用

# pip install web.py


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()
原文地址:https://www.cnblogs.com/amize/p/14831590.html