[Zope3-Users] Find the zope3 instance home directory (or the /var directory)

Stefan H. Holek stefan at epy.co.at
Tue Nov 6 11:42:39 EST 2007


I don't think there is any way whatsoever in Zope 3. There is no  
"instance" home to begin with, and the os.pardir hacks don't work  
either because you can't really know where your package is installed.

Stefan


On 6. Nov 2007, at 11:02, Eric Bréhault wrote:

> I had a look to different source code, and apparently the solution  
> is to use
> the path of the current file to get the instance home, so we have  
> code like
> this:
> os.path.normpath(
>             os.path.join(os.path.dirname(__file__),
>                          os.pardir, os.pardir, os.pardir, os.pardir))
>
> Is there any easier (and cleaner) way to do it ?

--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams




More information about the Zope3-users mailing list