# -*- coding: utf8 -*- import cgi BASE_TEMPLATE = u""" Tachame la doble

Tachame la doble







%s


Facundo Batista
@facundobatista
""" def main(environ): qs = environ.get('QUERY_STRING') if not qs: return BASE_TEMPLATE % ("",) q = cgi.parse_qs(qs) if not q or "t" not in q: return BASE_TEMPLATE % ("",) text = q["t"][0].decode("utf8") text = text + u" " t = u"".join(u"\u0336" + x for x in text) return BASE_TEMPLATE % (t,) def index(environ, start_response): status = '200 OK' response_headers = [('Content-type','text/html')] start_response(status, response_headers) html = main(environ) return [html.encode("utf8")]