[Zope-dev] Product Access to Files

Chris Withers lists at simplistix.co.uk
Thu Mar 11 07:04:29 EST 2004


> I'm overriding '__getitem__' and using Python's "os" package to directly
> access the local file system. I just sniff the file name extension and set
> the response content-type, then return the contents of the named file.
> Simple and stupid.

Ooo... I hope you're confident in what you're doing :-S
Should be vaguely okay, provided you're not writing to those files with the os 
module. Mindyou, Apache could serve 'em a LOT faster...

> (If anyone's curious, I'm using a Zope product for a back-end to a
> Mozilla/XUL front-end. This static file stuff allows the product to provide
> the XUL, JavaScript, and CSS files needed to define the Mozilla-based
> interface.)

Cool :-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope-Dev mailing list