python web


web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions.

web.py 0.37 is the latest released version of web.py. You can install it by running:

sudo easy_install web.py

Or to get the latest development version from git:

git clone git://github.com/webpy/webpy.git
ln -s `pwd`/webpy/web .
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()


Next article

Comment 评论



Share 分享

New Users 最新加入

  • hokurikustr

  • refrain

New comments 最新评论

test123: aasdas Details Apr 13 16:39
admin: Thanks! Details Apr 09 11:46
admin: Google map api Details Apr 09 11:46
lqj12: cooooooooool Details Apr 08 21:34
Yunhan Huang: 这个功能是如何实现的? Details Apr 08 13:23