I'm running a new python script, and after many trials I've got it running (somewhat). Here's the file:

```
#!/usr/bin/python
import cgi
import cgitb

print "Content-type: text/html"
print

print "this is working"

```

It runs great in SSH, but from the browser I get a 500 error. Consulting the error log, I get "Premature end of script header." I'm running Ubuntu with mod\_wsgi, and I believe that I've set up apache2.conf corectly, sites-available/default correctly, and I have the proper permissions and whatnot set correctly. And, like I said, python runs great in SSH - but I need it to run as a web app.

Any ideas from anyone out there? I've been working on this for two days, and nothing is working.