我无法从命令行运行web.py.

时间:2017-02-22 07:13:03

标签: python virtualenv web.py

我刚刚设置了一个新的virtualenv项目并安装了web.py,创建了一个测试应用程序,以查看事情是否按预期运行但它没有启动而且没有抛出任何错误

我在macOS Sierra 10.12.3上使用Python 2.7.13

webservice.py

import web

urls = (
    '/(.*)', 'hello'
)


class hello:
    def GET(self, name):
        if not name:
            name = 'Kitty'
        return 'Hello '+ name


if __name__ == "main":
    app = web.application(urls, globals())
    app.run()

requirements.txt

appdirs==1.4.0
nose==1.3.7
packaging==16.8
Paste==2.0.3
pyparsing==2.1.10
python-mimeparse==1.6.0
six==1.10.0
web.py==0.38

从命令行python webservice.py什么都不做

0 个答案:

没有答案