Those of you with web-sites out there must know how much fun it is to look at your web-site statistics. Yes, I’ve been staring dumbly at my stats the last days because I only just recently resolved the built-in stats counter on my DreamHost server with Textpattern.

Looking at my list of failed requests, I realized that my most failed request was for the python script I wrote for my news portal NewsBuffet. It turns out that the Apache server on my Dreamhost.com account will try to run the newsbuffet.py script rather than let you download it. So now, I’ve fixed it, and I serve up the code as a zip file.

Is this the best way, peoples?

Mark on 05/02 said:

If you want to display executable files such as .py files as text rather than execute them you should be able to remove the CGI handler for those files for the directory they are in by added (or modifying) the .htaccess file.

Put the line:

RemoveHandler cgi-script .py

in the .htaccess file in the directory containing your python files and that should do the trick.