[Zope] Re: CMFBTreeFolder Behavior

Max M maxm at mxm.dk
Mon Feb 28 09:46:59 EST 2005

David Pratt wrote:
> Hi.  I am working with the CMFBTreeFolder for the first time. I thought 
> it would make sense since I am wanting to use this type for an uploads 
> folder.  There may be thousands of objects.  Once files have been 
> uploaded to the folder, I am running a script to pull out images using a 
> for statement like this:
>     # Iterate over folder contents
>     for name, obj in start_dir.objectItems(['Portal Image']):
> and then executing some logic on the images afterwards.  I am planning 
> to cron the script unless I can figure a way to execute the logic as 
> files are coming into the folder (which would be the best - so any ideas 
> here would be great).

First of. Maybe your script runs into an error, and stops. It's hard to 
tell without seing the script what the problem is. It's most likely not 
a BTreeFolder issue.

If you need to do processing on an image, you should subclass the CMF 
Image class, and overwrite the methods necessary for postprocessing your 
images. That is a better solution than a cron job.


hilsen/regards Max M, Denmark

IT's Mad Science

More information about the Zope mailing list