title: Setting up python in sourceforge
body: <p>I am trying to host a sample program test.py in my sourceforge repository. I uploaded my file from the directory <code>/home/project-web/motiur/cgi-bin/</code> and then went to <code>motiur.sourceforge.net/cgi-bin/test.py</code>. Unfortunately I got an error that suggests premature end of headers .</p>
  
  <p>The source code of test.py :</p>
  
  <pre><code>#!/usr/local/bin/python
  import cgi, cgitb
  print "Content-type:text/html\n"
  print "&lt;html&gt;&lt;body&gt;This is another test&lt;/body&gt;&lt;/html&gt;"
  </code></pre>
  
  <p>The exact error is:</p>
  
  <pre class="lang-none prettyprint-override"><code>An error has been encountered in accessing this page. 
    1. Server: motiur.sourceforge.net 
    2. URL path: /cgi-bin/test.py 
    3. Error notes: Premature end of script headers: test.py 
    4. Error type: 500 
    5. Request method: GET 
    6. Request query string: 
    7. Time: 2013-01-12 14:49:39 UTC (1358002179)
  </code></pre>
  
  <p>BTW, I am using filezilla in windows and had set the file permission to 755, that is everybody can execute the file. This a noob question, a little help will be much appreciated. Thanks.</p>