On Jan 13, 2009, at 11:26 AM, mk wrote:

It's really basic:

def format_env(env):
    items = env.items()
    items.sort()
    vl = [ "%s: %r" % (el[0], el[1]) for el in items ]
    return "<br>\n".join(vl)


I use it in a template like this:

${h.format_env(request.environ)}

I assume that a public user will never see the output of that, right? Since a user can insert data into headers which appears in the environ. Anyways, just wrap that in the literal() and it should be fine.

Cheers,
Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to