+1 For @Burhan's answer. However for a simple working example you'll only need something like this:
import cherrypy
class HelloWorld(object):
@cherrypy.expose
def default(self, *args, **kwargs):
return "Hello world!" + cherrypy.url()
cherrypy.quickstart(HelloWorld())