import cgi # see library manual . . . form = cgi.FormContent() # parse input stream if form.has_key("fieldname"): data = form["fieldname"][0]