[mod_python] What is a directory?

Stefan C. Kremer skremer at q.cis.uoguelph.ca
Wed Jul 7 17:01:48 EDT 2004


From: "Gregory (Grisha) Trubetskoy" <grisha at modpython.org>

When InterpPerDirectory is On, the interpreter name would be based on the directory name extracted from req->filename.

So, I guess my question is how is the directory name "extracted" from 
req->filename?

Or to put it into more concrete terms, let me make a slight modification to the example in the link you provided:

For example, assume there is a /directory. /directory has an .htaccess file with a PythonHandler directive and InterpPerDirectory, but NO OTHER FILES.  Now suppose that apache is sent requests for:

	 (1) /directory/something
     (2) /directory/something.ext
     (3) /directory/something/something
     (4) /directory/something/something.ext
     (5) /directory/somethingelse
     (6) /directory/somethingelse.ext

Assuming that the python handler (via apache) sends some data back for all of these things.  Can you tell me which of these will share sub-interpreters and why?

Based on my preliminary observations it seems to me that only (1) and (4) end up sharing.  Would that make sense to you?

	Stefan



More information about the Mod_python mailing list