zoukankan      html  css  js  c++  java
  • webpy安装

    C:Usersceshi>python -m pip install web.py
    Collecting web.py
    Downloading web.py-0.38.tar.gz (91kB)
    100%                                      92kB 61kB/s
    Installing collected packages: web.py
    Running setup.py install for web.py ... done
    Successfully installed web.py-0.38

    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()

    127.0.0.1:55329 - - [20/Sep/2017 13:11:51] "HTTP/1.1 GET /" - 405 Method Not Allowed

    请求访求名写错GET写成Get

  • 相关阅读:
    习题2-7
    习题2-6
    习题2-5
    习题2-4
    习题2-3
    作业二 分支循环结构
    2- 8
    实验三-计算圆柱体积
    实验三-计算n个圆柱体体积
    实验3-计算圆面积
  • 原文地址:https://www.cnblogs.com/51testing/p/7560886.html
Copyright © 2011-2022 走看看