[mod_python] Installation help on Win32

Erik Stephens mod_python at 24ksoftware.com
Wed Mar 10 09:54:39 EST 2004

On Wed, 10 Mar 2004, Leon Hayes wrote:

> My problem is this:
> Whenever a try and visit a .py file via the browser, it writes out the
> python code to the screen instead of parsing it through python.
> I added this to the apache conf:
> <Directory c:/apache2/htdocs>
> AddHandler mod_python .py
> PythonHandler mptest
> PythonDebug On
> </Directory>

Do you have c:/apache2/htdocs/mptest.py defined?  Maybe you should be
using the publisher handler instead?  If not, what URL are you testing
and what is the contents of your mptest.py?  Also, should probably add
.pyc files also:

  <Directory c:/apache2/htdocs>
   AddHandler mod_python .py .pyc
   PythonHandler mod_python.publisher
   PythonDebug On

More info about the publisher handler here:


Best regards,

More information about the Mod_python mailing list