[Zope] Accessing to ZOPE_HOME

Tino Wildenhain tino at wildenhain.de
Sun Mar 20 16:05:18 EST 2005


Am Sonntag, den 20.03.2005, 12:44 -0800 schrieb leticia larrosa:
> Hi all:
>  
> How can access to the value of the "ZOPE_HOME" that
> Control_Panel shows in the Zope Management Interface?.
> My target is read in execution time a content of one
> external method, but my zope server can run over
> windows or linux, and i must refer the folder when the
> zope are installed, indeed when the external methods
> are located, for example:
> "/usr/lib/zope2.7/Extensions" or "C:\Program
> Files\Zope-2.7.4-0\Extensions"
> I prove with "os.getcwd()" but the value returned is
> for example:"/var/lib/zope2.7/instance/..."

Looks like you are really looking for some files
in context of your external method.

Use something like:

os.path.dirname(os.path.abspath(__file__))

in your module containing the external method.

HTH
Tino



More information about the Zope mailing list