headers = {'Content-Type': 'text/html'}
data = """<h1>Multiple Choices</h1>
<ul>
"""
data += ''.join('<li><a href="{0}">{0}</a></li>\n'.format(c) for c in choices)
data += '</ul>'
web.HTTPError.__init__(self, status, headers, data)
Webpy: how to set http status code to 300