CherryPy Project Download

best practice for helloworld..

not THE way, but trying to be the most future proof way.

import cherrypy

class HelloWorld:
    @cherrypy.expose()
    def index(self):
        return "Hello World!"

cherrypy.tree.mount(HelloWorld(), "/")
cherrypy.engine.start()
cherrypy.engine.block()

Hosted by WebFaction

Log in as guest/cherrypy to create/edit wiki pages