sudo apt-get install python-twisted
sudo apt-get install python-twisted-web2
wget http://twistedmatrix.com/projects/web2/documentation/examples/intro/simple.py
twistd -ny simple.py
And then point your web browser to http://<server address>:8080 — and go tweak the code.
Twisted.Web2 docs can be found at: http://twistedmatrix.com/projects/web2/documentation/.
See the Wikipedia article for overview of Twisted.