Your script doesn't follow the CGI standard. For every CGI script, follow these rules:
1: Print at least a Content-Type header.
2: Every header line should end with CRLF.
3: Close the header by printing an empty line.
Try this:
#!/usr/bin/python
print "Content-Type: text/plain\r\n\r\n";
print "Hello, Python!";