python 3.x上安裝web.py

python 3.x上安裝web.py

 查询之后,安装时使用pip3 install web.py==0.40.dev0

 最終可以运行

 app.py

import web
urls=(
    '/','index'
)
app=web.application(urls,globals())

class index:
    def GET(self):
        greeting="hello world"
        return greeting
        
        
if __name__=="__main__":
    app.run()
  

程序目录

 bin目录下app.py

原文地址:https://www.cnblogs.com/lisa2016/p/11953537.html