<!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&nbsp;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>&nbsp;</DIV>
<DIV>http:/your.web.site/tst&nbsp; &nbsp;&nbsp;&nbsp; -&gt; should return an 
empty list []</DIV>
<DIV>
<DIV>
<DIV>http:/your.web.site/tst/folderA &nbsp;&nbsp;&nbsp; -&gt; should return: 
['folderA']</DIV>
<DIV>
<DIV>http:/your.web.site/tst/folderB/folderC&nbsp;&nbsp;&nbsp; -&gt; should 
return ['folderB', 'folderC']</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV></DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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 &lt;<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>&gt;<BR><BR></DIV>
  <DIV>
  <DIV>&gt;In your root folder you could have a script that accesses the 
  ZCatalog&nbsp;which can &gt;be called from any subfolder and can tell where it 
  was called from... try the &gt;following:&nbsp; create a python script (tst) 
  in your root folder that contains the &gt;following code:</DIV>
  <DIV>&gt;&nbsp;</DIV>
  <DIV>&gt;return str(traverse_subpath)<BR></DIV>
  <DIV>&gt;&nbsp;</DIV>
  <DIV>&gt;then invoke this script file as followings:</DIV>
  <DIV>&gt;&nbsp;</DIV>
  <DIV>&gt;http:/your.web.site/tst</DIV>
  <DIV>
  <DIV>&gt;http:/your.web.site/tst/folderA</DIV>
  <DIV>
  <DIV>&gt;http:/your.web.site/tst/folderB/folderC</DIV>
  <DIV>&gt;&nbsp;</DIV>
  <DIV>&gt;(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&nbsp; 
  -&nbsp; 
  Zope@zope.org<BR>http://mail.zope.org/mailman/listinfo/zope<BR>**&nbsp;&nbsp; 
  No cross posts or HTML encoding!&nbsp; **<BR>(Related lists - 
  <BR>&nbsp;http://mail.zope.org/mailman/listinfo/zope-announce<BR>&nbsp;http://mail.zope.org/mailman/listinfo/zope-dev 
  )<BR></BLOCKQUOTE></BODY></HTML>