[mod_python] Questions on path_info and PSP

Andrew Barilla drew at exit66.com
Tue May 4 15:31:26 EST 2004


I thought of doing it that way.  Here's some code to get the missing part
programatically:

missing_path = req.uri[:-len(req.path_info)]
missing_path = missing_path[str.rfind(missing_path, '/'):]

It's not pretty but it works.


On Tue, 4 May 2004 14:15:45 -0500, Adrian Holovaty wrote
> Andrew Barilla wrote:
> > [...] but when I do the following:
> >
> > http://localhost/test/some/parameters/and/stuff
> >
> > Only the /parameters/and/stuff is passed as path_info.  Is there an easy
> > way to get the '/some' part as well without breaking apart the req.uri or
> > req.filename values?
> 
> I've run into this same problem and haven't found an elegant 
> solution. Check out this thread:
> 
> http://www.modpython.org/pipermail/mod_python/2004-January/014825.html
> 
> HTH,
> Adrian



More information about the Mod_python mailing list