python cherryPy

先安装cherryPy模块,pip3 install cherryPy -i https://pypi.tuna.tsinghua.edu.cn/simple

在pycharm里建个文件

import sys
sys.path.append("./cheery")
import cherrypy
class HelloWord(object):
    @cherrypy.expose
    def index(self):
        return "success"
if __name__ == '__main__':
    cherrypy.quickstart(HelloWord(),'/')

 

你可能感兴趣的:(python)