import sys
import html

def application(environ, start_response):
    version = html.escape(sys.version)
    body = ("<!doctype html><html><head><meta charset='utf-8'><title>Ulpiano WSGI OK</title></head>"
            "<body style='font-family:Arial,sans-serif;padding:40px;text-align:center'>"
            "<h1 style='color:#1e3a8a'>Ulpiano WSGI OK</h1>"
            "<p>El servidor Phusion Passenger de HostGator esta ejecutando Python correctamente.</p>"
            "<p><strong>Version de Python en ejecucion:</strong><br>" + version + "</p>"
            "</body></html>").encode('utf-8')
    start_response('200 OK', [('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', str(len(body)))])
    return [body]
