Q:

Why does accessing a python file via a URL yield a 500 error?

I want a bunch of my friends to download a Python file, so I placed it on my Apache web server and told me friends to go to "http://mydomain.com/someDjangoModels.py".
However, going to "http://mydomain.com/someDjangoModels.py" produces an error 500. Why? The file "mySecretPythonFile.py" is chmodded to 777.
Apache error logs output the following:
[Thu Aug 30 12:04:54 2012] [error] [client 71.14.78.236] Premature end of script headers: someDjangoModels.py
[Thu Aug 30 12:05:35 2012] [error] [client 71.14.78.236] Premature end of script headers: someDjangoModels.py
[Thu Aug 30 12:05:50 2012] [error] [client 71.14.78.236] Premature end of script headers: someDjangoModels.py

A:

It sounds like the websever is trying to execute the file rather then download it. 
Suggestions:

Try chmoding to 666, so that its not considered executable
Try changing the extension from .py, so that it doesn't think its python script

