twill is a Web application testing package written in pure Python, it is a reimplementation of “Python Browser Poseur“.
If you want to test whether a Web site is up or not from within Python code then twill is one of the good option.
Twill is an excellent tool for testing Web applications, Twill can be used as a domain specific language via a command shell (twill-sh), or it can be used as a normal Python module, from within your Python code, It can also be used to automate form handling, especially for Web sites that require a login.
From developers point, everything can be run from the command line, both the twill shell and the Python scripts based on twill. There are no cumbersome GUIs to worry about. The assertion commands built into twill (code, find and notfind) should be enough for testing Web sites that use straight HTML and forms.