title: 502 error on python page
body: <p>I just installed python 27 and I'm trying to run a python page through my localhost server. I'm getting this error:</p>
  
  <p>HTTP Error 502.2 - Bad Gateway
  The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".</p>
  
  <pre><code>import MySQLdb
  
  db = MySQLdb.connect(host="localhost", # your host, usually localhost
                       user="root", # your username
                        passwd="pass", # your password
                        db="my_dbs") # name of the data base
  
  cur = db.cursor() 
  
  cur.execute("SELECT * FROM myTable")
  
  # print all the first cell of all the rows
  for row in cur.fetchall() :
      print(row[0])
  </code></pre>
  
  <p>I'm using Windows 7.</p>
  
  <p>Any idea what I'm doing wrong? Is it an IIS configuration problem? I have a python handler mapping:</p>
  
  <pre><code>pythonHandler
  Path: *.py
  State: Enabled
  Path Type: Unspecified
  Handler: CGIModule
  Entry Type: Local
  </code></pre>