title: Running a simple cgi webserver with python, but nothing shown on browser
body: <p>I was trying to run a cgi webserver using the following python script (hello.py):</p>
  
  <pre><code>print ('Content-Type: text/html')
  print
  print ('&lt;html&gt;')
  print ('&lt;head&gt;&lt;title&gt;Hello from Python&lt;/title&gt;&lt;/head&gt;')
  print ('&lt;body&gt;')
  print ('&lt;h2&gt;Hello from Python&lt;/h2&gt;')
  print ('&lt;/body&gt;&lt;/html&gt;')
  </code></pre>
  
  <p>I put hello.py in the cgi-bin folder of the dir where I am running python. 
  On the command window, I started the web server using:</p>
  
  <pre><code>python -m http.server --bind localhost --cgi 8000
  </code></pre>
  
  <p>Than I opened a browser with:
      <a href="http://localhost:8000/cgi-bin/hello.py" rel="nofollow noreferrer">http://localhost:8000/cgi-bin/hello.py</a></p>
  
  <p>The browser is opened, but it's blank, nothing is displayed, while it is supposed to display "Hello from python" according to the script.
  These are the message displayed on the backend, there seemed to be no error.</p>
  
  <pre><code>C:\python_dir&gt;python -m http.server --bind localhost --cgi 8000
  Serving HTTP on 127.0.0.1 port 8000 (http://127.0.0.1:8000/) ...
  127.0.0.1 - - [17/Feb/2018 15:14:41] "GET /cgi-bin/hello.py HTTP/1.1" 200 -
  127.0.0.1 - - [17/Feb/2018 15:14:41] command: C:\python_dir\python.exe -u 
  C:\Users\user\cgi-bin\hello.py ""
  127.0.0.1 - - [17/Feb/2018 15:14:41] CGI script exited OK
  </code></pre>
  
  <p>This is my first time with starting webserver, I cannot figure out what is wrong.</p>