As it stands, though, I think you need to: use getPhysicalPath(), and iterate overs the construction of a temporary path list object, using pop() to remove a folder from the list until using restrictedTraverse() with a conditional test of folder content finds a VHM or similar object that indicates you are in the virtual site root. Not a big deal, but it is around a dozen lines of code in a TTW python script to do this. Either that, or in theory (if using VHM), you could get the namespace of your VHM via acquisition, and just return its aq_parent...
Sean -----Original Message----- From: Chris McDonough [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 10:27 AM To: Casey Duncan; Lennart Regebro; [EMAIL PROTECTED] Subject: Re: [Zope-dev] [IDEA] ZopeRoot and SiteRoot Hmm... no, I dont think there's a call to get the virtual root. Although I imagine it would be pretty simple to add. ----- Original Message ----- From: "Casey Duncan" <[EMAIL PROTECTED]> To: "Chris McDonough" <[EMAIL PROTECTED]>; "Lennart Regebro" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, December 17, 2001 12:45 PM Subject: Re: [Zope-dev] [IDEA] ZopeRoot and SiteRoot > On Monday 17 December 2001 12:20 pm, Chris McDonough allegedly wrote: > > getPhysicalRoot already exists, and returns the top-level app object > > when called from any Zope object. > > You know I had a sneaking suspicion that this existed somewhere, which is why > I didn't go ahead and fishify it. Thanks for pointing that out. > > Is there a comparable all to get the site root? > > /---------------------------------------------------\ > Casey Duncan, Sr. Web Developer > National Legal Aid and Defender Association > [EMAIL PROTECTED] > \---------------------------------------------------/ > > _______________________________________________ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )