[Zope] (no subject)

Passin, Tom tpassin at mitretek.org
Thu Jun 3 14:39:10 EDT 2004


> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On 
> 
> Hi my name is Abraham and i have a problem using open in the external 
> methods in zope. I need open a file in the same folder where is the 
> referencing of the external method in the zope interface, but 
> it doesn't 
> work because i should use an absolute path in the open. Which is this 
> absolute path?

The best way is to have your external method do nothing except to call a
Python module in some other directory - preferably outside the Zope
directory structure so that you can replace or relocate Zope without
losing or messing up your module.

You can find out where that module is by using its __file__ property.
>From there, you can find other relative paths you are interested in.

This approach also keeps the extensions directory as clean and
uncluttered as possible, which is also a good thing.

Cheers,

Tom P



More information about the Zope mailing list