1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import string from time import time import cherrypy import uuid class Root(object): @cherrypy.expose def index(self): return 'Sup?' from button import Button cherrypy.tree.mount(Root()) cherrypy.tree.mount(Button(), '/button', { '/': {'request.dispatch': cherrypy.dispatch.MethodDispatcher()} }) cherrypy.engine.start() cherrypy.engine.block()