[Zope3-Users] retrieving zope.conf parameters and paths of buildout dirs

Bernd Dorn bernd.dorn at lovelysystems.com
Thu Apr 17 13:42:12 EDT 2008

On 17.04.2008, at 18:23, Christophe Combelles wrote:
> Hi,
> I'm looking for reliable ways in my application code to retrieve the  
> path of some directories or files in a zopeproject buildout.
> When I need to get a sample data file for tests in a package I'm  
> just using join(dirname(package_name.__file__), 'sampledata') and  
> that's ok.
> But how do I get the path of upper directories such as var, log or  
> the blob-dir?
> Can I retrieve them from zope.conf?
> I'm not sure whether I should use zope.app.appsetup, ZConfig, or  
> anything else.

you can use product config of zope conf like this

an example for use of productconfig is



if xou generate the zope.conf file with buildout you can also use  
buildout paths

> thanks
> Christophe
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users

Lovely Systems, senior developer

phone: +43 5572 908060, fax: +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria
skype: bernd.dorn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2548 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20080417/a42d63eb/smime.bin

More information about the Zope3-users mailing list