[Zope] open again

Passin, Tom tpassin at mitretek.org
Thu Jun 3 16:16:19 EDT 2004


-----Original Message-----
> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On 
> Behalf Of Abraham Arellano Tavara

> thanks i'll try to make this real, but i'm new in this i for 
> the things that 
> i read i thought that i can use the command "open" easily, 
> but i see that is 
> not possible..

Only because of the absolute path.  Now, you could just write that path
into your Python code, but the way I illustrated allows you to move your
code to other directories and still find the right path.  That is a big
advantage.

> I have another question, which is the BASEPATH, the path to 
> the pakage 
> YourProject??

It is the absolute path to the location of the directory where you put
the code you want to run.  The __init__.py file will know where it is
located, and so we use that knowledge.

> && where goes the last part of code that you show to me?? in 
> the init.py or 
> in a external method in the directory Extensions??
> sorry for these questions... first time in zope..
> 

The very last lines of code belong in the file in which you put the code
for your external method.  That file will be in the Zope\Extensions
directory.
 
Cheers,

Tom P



More information about the Zope mailing list