apache & mod_python

m.banaouas banaouas.medialog at wanadoo.fr
Sun Dec 10 20:01:22 EST 2006


Graham Dumpleton a écrit :
> m.banaouas wrote:
>> thanks for your answers
>> The plateform I target is Windows XP (no body is perferct ...).
>>
>> Concerning multithread , is simultaneous multi http client calls can
>> present any problem ? I don't think because usually http server fires a
>> different process for each client call, while Threading is discussed
>> within the same process, isn't it?
> 
> The use of a separate process to handle each request only applies to
> the 'prefork' MPM on UNIX systems. Being on Windows, the 'winnt' MPM is
> used and concurrent requests are always handled within different
> threads within the same Apache process. The referenced article should
> have made that clear.

Ok, obviously, i will be concerned by thread architecture under win32.

>> I'm still looking for mod_python 3.2.10 to install it with apache 2.2.3
>> It seems like I must "build" it before use it.
>> If there is no other mean I will do it but usually I retrieve "ready to
>> use" kits.
> 
> See:
> 
>   http://nicolas.lehuen.com/download/mod_python/
I found it too on http://apache.fastorama.com/dist/httpd/modpython/win/

I would like to warn users about a trick while testing this code (widely 
proposed):
#
# helloworld.py
#
from mod_python import apache
#
def handler(req):
   req.content_type = ’text/plain’
   req.write("Hello World!")
   return apache.OK

’text/plain’ don't use regular string delimiters (' and ").
so python interpretter is not happy at all ...



More information about the Python-list mailing list