環境変数一覧表(os.environ.items)
#! /usr/bin/python
# coding: UTF-8
import os
import re
print "Content-type: text/html"
print """
<html>
<head>
<title>環境変数一覧表</title>
</head>
<body>
<table align="center" border="1" bordercolor="00cc66" cellspacing="0">
"""
for key, value in os.environ.items():
value = re.sub("\w", "*", value) #サンプルのため非表示
print "<tr><td>%s</td><td>%s</td></tr>" % (key, value)
print """
</table>
</body>
</html>
"""
〔 実行する 〕