Posted By

fuzzylollipop on 02/04/10


Tagged

python cgi env


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

fuzzylollipop


Get CGI Server Environment Variables


 / Published in: Python
 

  1. #!/usr/bin/env python
  2.  
  3. import os
  4.  
  5. print 'Content-Type: text\html
  6.  
  7. '
  8. print '<h1>Server CGI Environment</h1></br>'
  9. print '<ul>'
  10. for param in os.environ.keys():
  11. print '<li>%s = %s</li>' % (param,os.environ[param])
  12. print '</ul>'

Report this snippet  

You need to login to post a comment.