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

http://svn.zope.org/z3c.extfile/trunk/src/z3c/extfile/README.txt?rev=82753&view=auto

http://svn.zope.org/z3c.extfile/trunk/src/z3c/extfile/utility.py?rev=83530&view=markup

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





thanks
Christophe
_______________________________________________
Zope3-users mailing list
Zope3-users@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



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to