[mod_python] Installing mod_python (newbie)

Philippe C. Martin pmartin at snakecard.com
Tue Oct 18 16:18:15 EDT 2005


Jorey, thanks, that did it !


I'll need to do some reading for 
1) I do not fully comprehend the reasons you're invoking here:
> SetHandler causes mod_python to handle *all* files in the directory, and
> allows you to leave off the .py extension. Publisher requires you to
> point the URL at a function within the module. AddHandler lets you mix
> files, but you must call the module with the .py extension.
>
> When using SetHandler, you can create a file named index.py with a
> function named index, and leave both off the URL. This has historically
> caused some problems that 3.2b claims to address. I've haven't checked
> this myself, but try it next if you really want to use only the
> directory in the URL with a default module/function.

2) I think I did follow the tutorial faithfully


But I got started ! thanks a bunch.

Regards,

Philippe



On Tuesday 18 October 2005 07:58 pm, Jorey Bump wrote:
> Philippe C. Martin wrote:
> > I also noticed that the localhost/mp pages shows "Apache/2.0.55 (Unix)
> > mod_python/3.2.0b Python/2.4.2 Server at 127.0.0.1 Port 80" at the
> > bottom.
>
> Okay, then mod_python is loaded and running. I think your test is
> flawed, however. Try something simpler:
>
> <Directory "/var/www/html/mp">
>    SetHandler python-program
>    PythonHandler mod_python.publisher
>    PythonDebug On
> </Directory>
>
> Create /var/www/html/mp/hello.py:
>
> def world():
>      return "Hello, world!"
>
> Restart apache and point a browser at:
>
>   http://localhost/mp/hello/world
>
> SetHandler causes mod_python to handle *all* files in the directory, and
> allows you to leave off the .py extension. Publisher requires you to
> point the URL at a function within the module. AddHandler lets you mix
> files, but you must call the module with the .py extension.
>
> When using SetHandler, you can create a file named index.py with a
> function named index, and leave both off the URL. This has historically
> caused some problems that 3.2b claims to address. I've haven't checked
> this myself, but try it next if you really want to use only the
> directory in the URL with a default module/function.
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

-- 
*************************************
Philippe C. Martin
SnakeCard, LLC
www.snakecard.com
+1 405 694 8098
*************************************


More information about the Mod_python mailing list