码迷,mamicode.com
首页 > 编程语言 > 详细

Python简单Web框架web.py实例hello world

时间:2017-07-20 16:27:07      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:web   ati   ==   global   class   get   实例   object   world   

1、安装web.py模块easy_install web.py

2、实现代码

import web
 
urls = (‘/hello‘, ‘hello‘,
       )
 
class hello(object):
    def GET(self):
        return ‘hello world‘
 
if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()

  

Python简单Web框架web.py实例hello world

标签:web   ati   ==   global   class   get   实例   object   world   

原文地址:http://www.cnblogs.com/szmcn/p/7211806.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!