title: Running python script on local server only shows source code
body: <p>I have a question regarding a Python running problem.
  I set up a local server with the Windows command prompt using the <code>python -m http.server 8000</code> command, but when I run my script on <code>http://localhost:8000/cgi-bin/hello.py</code>, it just shows me the source code instead of actually running the script.</p>
  <p>I use the code i found on  <a href="http://www.johnloomis.org/python/cgiserver.html" rel="nofollow noreferrer">this</a> link.</p>
  <pre><code>#!/usr/bin/python
  
  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've seen several people having the same problem, but I couldn't really find a solution.
  I work with Python 3.5</p>