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
2009-01-15 08:19:29