tags:

views:

1333

answers:

3
+3  A: 

You use the cgi.FieldStorage class. Example CGI script:

#! /usr/bin/python

import cgi
from os import environ
import cgitb
cgitb.enable()

print "Content-type: text/plain"
print
print "REQUEST_METHOD:", environ["REQUEST_METHOD"]
print "Values:"
f = cgi.FieldStorage()
for k in f.keys():
    print "%s: %s" % (k, f.getfirst(k))
codeape
A: 

codeape already answered on this. Just for the record, please understand that how the HTTP request is emitted is totally orthogonal - what the server get is an HTTP request, period.

bruno desthuilliers
A: 
Max