[mod_python] modpython, mysqldb best paractice

Graham Dumpleton grahamd at dscpl.com.au
Wed Jul 19 07:07:37 EDT 2006


On 19/07/2006, at 7:41 PM, Martijn Moeling wrote:

> First of all I am confused about PythonInterPerDirectory and  
> PythonInterpPerDirectory
>
> In the way I use modpython.

Do you mean PythonInterpPerDirectory and PythonInterpPerDirective?  
Anyway,
your mail doesn't indicate in what way you are confused about them.

Note there are bugs in current versions of mod_python related to both  
of these
directives and I personally wouldn't generally recommend they be used  
anyway.
Is there a specific reason you might be using them rather than being  
more
specific and using PythonInterpreter instead?
> Also I do not understand the req.register_cleanup() method, what is  
> cleaned up and what not?
What is cleaned up is dependent on what the function you register to  
be called
does. Ie., up to you what is done. What the cleanup phase does is  
simply give
you the opportunity to do some work after all other phases have been  
performed.

If you don't understand the different phases that a request goes  
through, you
might want to read:

   http://162.105.203.19/apache-doc/24.htm#BIN68

This from a book about writing modules for Apache in Perl and C.  
There is lots
of other stuff there about how Apache works as well.

Graham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060719/05f803ad/attachment.html


More information about the Mod_python mailing list