function mix()
{
$.ajax({
url: "cgi-bin/test.py",
type: "post",
data: JSON.stringify({'letters':letters,'intervals':intervals}),
dataType: "json",
success : function(response)
{
$("#div").html(response);
}
});
};
import json, sys
result = "success"
myjson = json.load(sys.stdin)
print myjson
# Do something with 'myjson' object
print 'Content-Type: application/json\n\n'
print json.dumps(result) # or "json.dump(result, sys.stdout)"