Home

  Documentation

  Download

  News

  Examples

env.py Source Code

C:/Work/Lemon/Backups/Lemon-0.2.10/Lemon-0.2.10/../../doc/examples/code/env.py
#!/usr/bin/env python

"Environmental variables example."

import cgitb; cgitb.enable() # Enable the error reporting engine so that you can see any errors.

import os
print "Content-type: text/html

"
print "<html><h1>Environmental Variables</h1><p>"
for env, value in os.environ.items():
    print "%s:   %s<br>"%(env,value)
print '</p></p></html>'

© 2002-2003 James Gardner