[Zope] Re: Zope Digest, Vol 2, Issue 8

Gabriel Genellina gagenellina at softlab.com.ar
Tue Sep 9 20:27:18 EDT 2003


At 9/9/2003 11:08, you wrote:

>Error Type: IOError
>Error Value: [Errno 2] No such file or directory: 'chr1/CDS.htm'"
>
>The external method is in a folder called database, inside that folder are 
>14 folders called chr1, chr2, chr3 etc..., and inside any folder is a DTML 
>document called CDS.htm. Please help me with this because I don't know 
>what's the problem.

Don't confuse the Zope hierarchy stored in the ZODB with folders in the 
filesystem.
You can't use open() to access a DTML document inside a folder stored in 
Zope, because it's not a file contained in a directory.
To enumerate all folders use objectValues('Folder'); you can get the DTML 
Document using folder['CDS.htm'] and you can get the raw document source 
with document_src(). And you can use a python script instead of an external 
method. See the API Reference in the Zope Book.
And try to learn regular expressions, those boring string searches are 
really very much simpler.


Gabriel Genellina
Softlab SRL




More information about the Zope mailing list