[Grok-dev] Re: access to the parts directory
Joachim Schmitz
js at aixtraware.de
Sat Apr 26 07:10:26 EDT 2008
Christian Theune schrieb:
>
> True. As a note how to solve his specific question, he can use the products
> section in zope.conf generated by buildout:
>
> (this is pseudo-buildout)
>
> zope.conf = ...
> <product-config joachim>
> my-path ${buildout:directory}/parts/foo
> </product-config>
>
>
> Then in your code, you can retreive this data using:
>
> import zope.app.appsetup.product
> zope.app.appsetup.product.getProductConfiguration('joachim').get('my-path')
>
> Christian
>
thanks that is exactly what I was looking for. I put
<product-config import>
import_path /home/perry/WAeUP_ng/Campus/parts/import
</product-config>
in my zope.conf
and
zope.app.appsetup.product.getProductConfiguration('import').get('import_path')
gives me:
/home/perry/WAeUP_ng/Campus/parts/import
I will write documentation for this during the grokkerdam sprint.
--
Gruß Joachim
More information about the Grok-dev
mailing list