[mod_python] cg-bin files execution

Francois py at topmusic.ch
Thu Dec 2 08:31:05 EST 2004


> The following is in the section "testing " in the mod_python tutorial
> <Directory /some/directory/htdocs/test>
>   AddHandler python-program .py
>   PythonHandler mptest
>   PythonDebug On
> </Directory>
> Should i put the PythonHandler mptest for every script filename?
> Because
> it's too exhausting for so many files.
> And what about the psp files?

Personnaly, I use mod_python.publisher with this configuration in .htaccess
file :

#/your/www/directory/.htaccess
AuthType Basic
DirectoryIndex index.py
AddHandler python-program .py
PythonHandler mod_python.publisher
PythonDebug On
Allow from all

So, when you type the url :
http://mywebsite/
python call the function 'index' in then file
/your/www/directory/index.py

and
http://mywebsite/test.py/myfunction
python call the function 'myfunction' in then file
/your/www/directory/test.py

Best regards
Francois



More information about the Mod_python mailing list