<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>traverse_subpath works for me just fine. if
you placed the 'tst' python script in your root folder (and this script contains
the line "return str(traverse_subpath)" ) you should get:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>http:/your.web.site/tst -> should return an
empty list []</DIV>
<DIV>
<DIV>
<DIV>http:/your.web.site/tst/folderA -> should return:
['folderA']</DIV>
<DIV>
<DIV>http:/your.web.site/tst/folderB/folderC -> should
return ['folderB', 'folderC']</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What version of zope are you running? (I am running
zope 2.9.2 on a linux box).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV></DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=javier_subervi@yahoo.com
href="mailto:javier_subervi@yahoo.com">Javier Subervi</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=zope@zope.org
href="mailto:zope@zope.org">zope@zope.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, December 12, 2006 1:16
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Zope] Re: Preserving
Context</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><SPAN
style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: black 1px solid; PADDING-LEFT: 3px; FONT-SIZE: xx-small; Z-INDEX: 500; LEFT: 0pt; PADDING-BOTTOM: 0px; BORDER-LEFT: black 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: sans-serif; POSITION: absolute; TOP: 0pt; BACKGROUND-COLOR: rgb(214,227,254)"
mlb_idspanflag="true" idspanfor="frame">75</SPAN>
<DIV><SPAN
style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: black 1px solid; PADDING-LEFT: 3px; FONT-SIZE: xx-small; Z-INDEX: 500; LEFT: 0pt; PADDING-BOTTOM: 0px; BORDER-LEFT: black 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: sans-serif; POSITION: absolute; TOP: 0pt; BACKGROUND-COLOR: rgb(214,227,254)"
mlb_idspanflag="true" idspanfor="frame">2</SPAN>
<DIV class=headers>
<DIV class=face><A href="http://ftp.cs.indiana.edu/pub/faces/picons/"
target=_top><IMG alt=Picon
src="http://cache.gmane.org//gmane/comp/web/zope/general/56700-picon-001.gif"
border=0><SPAN
style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: 1px solid; DISPLAY: inline; PADDING-LEFT: 3px; FONT-SIZE: xx-small; Z-INDEX: 500; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN-LEFT: 3px; BORDER-LEFT: 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: 1px solid; FONT-FAMILY: sans-serif"
mlb_idspanflag="true" idspanfor="img"></SPAN></A></DIV>From: Jonathan <<A
href="mailto:dev101@...109" target=_top>dev101@...<SPAN
style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: 1px solid; DISPLAY: inline; PADDING-LEFT: 3px; FONT-SIZE: xx-small; Z-INDEX: 500; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN-LEFT: 3px; BORDER-LEFT: 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: 1px solid; FONT-FAMILY: sans-serif"
mlb_idspanflag="true" idspanfor="link">109</SPAN></A>><BR><BR></DIV>
<DIV>
<DIV>>In your root folder you could have a script that accesses the
ZCatalog which can >be called from any subfolder and can tell where it
was called from... try the >following: create a python script (tst)
in your root folder that contains the >following code:</DIV>
<DIV>> </DIV>
<DIV>>return str(traverse_subpath)<BR></DIV>
<DIV>> </DIV>
<DIV>>then invoke this script file as followings:</DIV>
<DIV>> </DIV>
<DIV>>http:/your.web.site/tst</DIV>
<DIV>
<DIV>>http:/your.web.site/tst/folderA</DIV>
<DIV>
<DIV>>http:/your.web.site/tst/folderB/folderC</DIV>
<DIV>> </DIV>
<DIV>>(substitute your own subfolders as required)</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR>You're
going to be disappointed, but whenever I substituted in any number of valid
folders, I got the same result:<BR><BR>[]<BR><BR>an empty
set!<BR>TIA,<BR>Javier<BR></DIV></DIV></DIV></DIV></DIV></DIV><BR>
<HR SIZE=1>
Have a burning question? Go to <A
href="http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx">Yahoo!
Answers</A> and get answers from real people who know.
<P>
<HR>
<P></P>_______________________________________________<BR>Zope maillist
-
Zope@zope.org<BR>http://mail.zope.org/mailman/listinfo/zope<BR>**
No cross posts or HTML encoding! **<BR>(Related lists -
<BR> http://mail.zope.org/mailman/listinfo/zope-announce<BR> http://mail.zope.org/mailman/listinfo/zope-dev
)<BR></BLOCKQUOTE></BODY></HTML>