Q: How to pass in values from a XMLHttprequest with .open() into a python script I want to do this:
Run a python scipt with out of javascipt:
    function getDescription() {
        <!-- var snd_name = document.getElementById("name").value;  -->
        var url = '/cgi-bin/events.py?name=1';

        if (window.XMLHttpRequest) {
            req = new XMLHttpRequest();
        } else if (window.ActiveXObject) {
            req = new ActiveXObject("Microsoft.XMLHTTP");
        }
        printEvent('Client','Sent request ...');
        req.onreadystatechange = processRequest;
        req.open("GET", url, true);
        req.send(null);
    }

The finction getDesciption is called somewhere else. 
Now I pass with req.open the URL including parameters to the python script. 
In the python script I like to so some thing like this:
import time
import cgi
import sys
import cgitb; cgitb.enable()
import urlparse
import urllib

result = READ_THE_PARAMETERS... I have no clue what to do here...

a = result[name]

print[a]

And in a I should the "1". 
It is probably pretty easy, but not today for me. 
Please help. 
Thank you Peter

A: parameters = cgi.FieldStorage()
a = parameters[name]
print a

