class HelloWorld(object):

    def index(self):
        return 'Hello World!'
index.exposed = True
application = HelloWorld()
if __name__ == '__main__':
    cherrypy.engine.start()
Setting up Python on Windows/ Apache?