title: How to print to HTML using python as server side script?
body: <p>I have the following html button</p>
  
  <pre><code>&lt;td&gt;&lt;form id="form2" name="form2" method="post" onclick="../cgi-bin/py/GuestBookEntry.py"&gt;
  &lt;input type="submit" name="gBookSrib" id="gBookSrib" value="Sribble" /&gt;
  &lt;/form&gt;&lt;/td&gt;
  </code></pre>
  
  <p>My python script is</p>
  
  <pre><code>#!/usr/bin/python
  print "Content-type: text/html\n\n"
  print "&lt;html&gt;&lt;body&gt;Hello World!&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>When i click the button i want my serverside script to execute and create a html page. How do i do that?</p>
  
  <p>My webhost service provider is fatcow. I think he runs apache, is there a way to check it though? Yes he supports python cgi script. He mentioned that if i place my 'py' files inside the cgi-bin, it should work, even without the 'she'bang.</p>
  
  <p>Fatcow does not allow custom modules. Only standard python modules. They had not allowed access to my cgi-bin folder by default, so had to call them, and then the below stuff just worked.</p>