[Grok-dev] Re: The equivalent of zope2's package_home()
Martijn Faassen
faassen at startifact.com
Wed Jul 9 16:06:07 EDT 2008
Peter Bengtsson wrote:
> In zope2 with package_home(globals()) you could get the Product's
> directory. For example
> '/home/peterbe/zope123/Products/FooProduct'
>
> What's the equivalent in Grok?
>
> ...or do I have to combine os.path.dirname() with __file__?
Yes, the latter is the general pattern to find the package you are in.
Of course it's interesting to learn what you need access to, perhaps
this can be generalized.
Regards,
Martijn
P.S. I missed you at EuroPython!
More information about the Grok-dev
mailing list