CherryPy
CherryPy version 3.2 is the first major web application server to be made available on the Python 3 platform. It can be downloaded from http://cherrypy.org/. It is not a full-stack framework like the very popular Django, TurboGears, or Zope libraries. These frameworks provide extra support for data storage, templating, authentication, and other common web operations. Such features are not impossible in CherryPy, you're just responsible for finding or implementing them yourself.
CherryPy is a very powerful web server that uses a simple design for building web applications. Let's jump in head-first with a simple example that serves the HTML file we developed in the previous section:
import cherrypy class SimplePage: @cherrypy.expose def index(self): with open("html_document.html") as file: return file.read() cherrypy.quickstart(SimplePage())
If we run this program, we can visit http://localhost:8080/
in a web browser to see the web page in action. All we...