title: How Python web frameworks, WSGI and CGI fit together
body: <p>I have a <a href="http://en.wikipedia.org/wiki/Bluehost" rel="noreferrer">Bluehost</a> account where I can run Python scripts as CGI. I guess it's the simplest CGI, because to run I have to define the following in <code>.htaccess</code>:</p>
  
  <pre><code>Options +ExecCGI
  AddType text/html py
  AddHandler cgi-script .py
  </code></pre>
  
  <p>Now, whenever I look up web programming with Python, I hear a lot about WSGI and how most frameworks use it. But I just don't understand how it all fits together, especially when my web server is given (Apache running at a host's machine) and not something I can really play with (except defining <code>.htaccess</code> commands).</p>
  
  <p>How are <a href="http://en.wikipedia.org/wiki/Web_Server_Gateway_Interface" rel="noreferrer">WSGI</a>, CGI, and the frameworks all connected? What do I need to know, install, and do if I want to run a web framework (say <a href="http://webpy.org/" rel="noreferrer">web.py</a> or <a href="http://en.wikipedia.org/wiki/CherryPy" rel="noreferrer">CherryPy</a>) on my basic CGI configuration? How to install WSGI support?</p>