[mod_python] AttributeError: handler

Mads Kiilerich Mads at Kiilerich.com
Mon Jun 5 15:13:40 EST 2000

Friday I got mail from Gregory Trubetskoy:

> The message means that module test did not have a function called
> "handler".
> Grisha

Thanks for the fast response.

But test.py contains the following, according to the example in
the documentation:

from mod_python import apache

def handler(req):
	req.write("Hello World!")
	return apache.OK 

As far as I can see there _is_ a function called "handler"!?

Can you confirm that the example from the documentation works
"out of the box"?

Also: Should the .py be compiled to .pyc?

Mads Kiilerich          Sys.Adm. Cand.Polyt
Mads at Kiilerich.com      Tel. +45 38 16 26 00  Mob. +45 26 20 07 73
Møntmestervej 12B 1th,  DK-2400 NV,  Denmark

"Learned about WAP. It sucks. The more I play with WML the more sure 
I am that WAP will die out rapidly once phones doing HTML exist."
							Alan Cox

More information about the Mod_python mailing list