使用conf启动
app.conf
[/favicon.ico] tools.staticfile.on: True tools.staticfile.filename: "/path/to/myfavicon.ico"
test.py
import cherrypy class HelloWorld(object): @cherrypy.expose def index(self): return "Hello World!" if __name__ == '__main__': cherrypy.quickstart(HelloWorld(), '/', "app.conf")