Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > mod_python 2.7.10 - publisher

Reply
Thread Tools

mod_python 2.7.10 - publisher

 
 
charlie knudsen
Guest
Posts: n/a
 
      11-27-2004
I am setting up mod_python 2.7.10 on Apache 1.3.33 as a dso and was
wondering if there is a default function that is called when the publisher
handler is not given a function. I have read through some documentation
and it looks like mod_python 3.x defaults to the index function, but that
does not appear to work for 2.7. Also I am using python 2.3.4.

I have the following file as index.py in the test directory of my web root:

from mod_python import apache

def index(req):
return "hello world"

Currently I get the following behavior:

http://localhost/test/index.py - 404 error
http://localhost/test/index.py/index - my "hello world" output
http://localhost/test/index.py/ - I get :
----------------------
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 193, in
Dispatch
result = object(req)

File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 88,
in handler
if func_path[-1] == ".":

IndexError: string index out of range
----------------------

I was wondering if there was a default function in mod_python 2.7.10.

If not, is there any reasons why I should not add one? Other than the fact
that the current implementation is well tested.

Thank you,

Charlie

 
Reply With Quote
 
 
 
 
charliek
Guest
Posts: n/a
 
      11-28-2004

> I was wondering if there was a default function in mod_python 2.7.10.
>
> If not, is there any reasons why I should not add one? Other than the
> fact that the current implementation is well tested.
>


I looked at the source code for the publisher handler and it looks like the
2.7.x version of mod_python does not default to anything. I just added a
couple of lines to make it default to the index function.

Got to love open source!

Thanks,

Charlie

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combining mod_python handlers publisher and psp problem exhuma.twn Python 3 03-20-2006 02:39 PM
mod_python mptest.py works publisher not Python_it Python 0 10-12-2005 10:03 AM
Mod_Python - How to make Publisher Handler work? Nancy Python 1 07-18-2004 04:16 PM
Need to pass variables from mod_python publisher to standalonescript. Anthony Raj Python 0 06-18-2004 03:12 PM
View Publisher files without Publisher T-Boy NZ Computing 2 02-26-2004 11:06 AM



Advertisments