[Zope] open again

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


> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On 
> Behalf Of Small Business Services
> 
> Quick and dirty solution:
> 
>   fileptr = open('somefile', 'r')              # open file 
> with read access
>   instr = fileptr.readline()                    # read a line
> 
> Where 'somefile' is the name of the data file that resides in 
> your .../Extensions directory (same directory as the external 
> method which is opening the file).
> 
> You should get yourself some python documentation.
> 

No - you cannot be sure where the default directory is, so this may work
sometimes and not work other times.  The default directory can get
changed by other code.  You should never rely on it.

The OP's problem was that he did what you said and couldn't find the
target file.

Cheers,

Tom P



More information about the Zope mailing list