gyorgy@0: import cherrypy gyorgy@0: from cherrypy.lib.static import serve_file gyorgy@0: gyorgy@0: class OnePage(object): gyorgy@0: def index(self): gyorgy@0: return "one page!" gyorgy@0: index.exposed = True gyorgy@0: gyorgy@0: gyorgy@0: class TwoPage(object): gyorgy@0: def index(self): gyorgy@0: return serve_file('/Users/tmc/write_it.txt', "audio/mpeg", "attachment") gyorgy@0: index.exposed = True gyorgy@0: gyorgy@0: class HelloWorld(object): gyorgy@0: onepage = OnePage() gyorgy@0: twopage = TwoPage() gyorgy@0: gyorgy@0: def index(self): gyorgy@0: return "hello world" gyorgy@0: index.exposed = True gyorgy@0: gyorgy@0: cherrypy.quickstart(HelloWorld())