Final version of ugly cgi python script.