PythonHandler, fortsättning Ett fakultetsexempel: def handler(req): form = util.FieldStorage(req) apache.log_error("PythonHandler now running") req.contenttype = "text/html" req.send_http_header() if form.has_key("fakof"): fakof = int(form["fakof"]) req.res = 1 while fakof: req.res*=fakof fakof-=1 req.fakof = int(form["fakof"]) req.write("fak(%d) = %d" % (req.fakof, req.res)) else: req.write("Please give me a value as the parameter 'fakof'") return apache.OK