Re: [Zope-dev] Product Access to Files

2004-03-12 Thread Chris Withers
Ian Beatty wrote: Not in the least! =8-0 I've never mucked around this deep within Zope before. What's the danger... threading issues? Yeah, but should be okay as you're only reading... It's a whole lot easier to have those files nicely packaged inside my product, so that all someone needs to do

Re: [Zope-dev] Product Access to Files

2004-03-11 Thread Chris Withers
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

Re: [Zope-dev] Product Access to Files

2004-03-11 Thread Ian Beatty
On 2004-03-11 7:04 AM, Chris Withers is reputed to have said: 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

Re: [Zope-dev] Product Access to Files

2004-03-10 Thread Ian Beatty
On 2004-03-10 10:14 AM, Chris Withers is reputed to have said: Ian Beatty wrote: I've been messing around with DTMLFile and ClassicHTMLFile and the like, haven't been able to figure out how to get it to work for arbitrary paths. They also require all my file names end in '.dtml', which is

[Zope-dev] Product Access to Files

2004-03-09 Thread Ian Beatty
Greetings. I'm developing a Python-based product that needs to serve up a variety of XML files out of the product's directory. That is, certain URLs handled by instances of a product-defined type need to return an XML file that's on disk along with the product's DTML views and the like. Let's say