[mod_python] AddHandler / SetHandler (black magic)

Graham Dumpleton grahamd at dscpl.com.au
Fri Oct 6 08:27:55 EDT 2006


On 06/10/2006, at 9:01 PM, Graham Dumpleton wrote:

>>     extentions_we_handle = ["html","py"]  # list of ext you want  
>> to handle
>>     ext = req.filename.split(".")
>
> If you are going to do that, you should use:
>
>   import posixpath
>   ext = posixpath.splitext(req.filename)[0]

Whoops.

   ext = posixpath.splitext(req.filename)[1]

Graham


More information about the Mod_python mailing list