[mod_python] AttributeError: handler

Alexis Iglauer aiglauer at yahoo.com
Mon Jun 5 07:08:41 EST 2000


Always a good idea to just run python over your script
before trying to run it on the webserver - this will
pick up any inconsistent dedents or other little
syntax nasties.

If you are in unix, edit the file in vi and type in
':set list' - you can then see which of your nice
spaces are actually sneaky tabs :)

Regards
aei


--- Gregory Trubetskoy <grisha at modpython.org> wrote:
> 
> Mads - 
> 
> Everyone who reported this problem so far found
> later on that they had
> extra blanks in their test.py because they cut and
> pasted from the web
> page.
> 
> No, you don't need to compile your py into a pyc -
> Python will do that for
> you.
> 
> --
>   Gregory (Grisha) Trubetskoy
>        grisha at modpython.org
> 
> On Mon, 5 Jun 2000, Mads Kiilerich wrote:
> 
> > Friday I got mail from Gregory Trubetskoy:
> > 
> > But test.py contains the following, according to
> the example in
> > the documentation:
> > 
> > 
> > from mod_python import apache
> > 
> > def handler(req):
> > 	req.send_http_header()
> > 	req.write("Hello World!")
> > 	return apache.OK 
> > 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com



More information about the Mod_python mailing list