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 stupid.
> Ooo... I hope you're confident in what you're doing :-S

Not in the least! =8-0 I've never mucked around this deep within Zope
before. What's the danger... threading issues?

> Should be vaguely okay, provided you're not writing to those files with the
> os module.

No writing, only reading.

> Mindyou, Apache could serve 'em a LOT faster...

It's a whole lot easier to have those files nicely packaged inside my
product, so that all someone needs to do is install the product and be done
with it. No separate directory of files to put somewhere, no Apache
configuration to do, no URL issues.

I'm wide open to suggestions for a better way to do this!

>> (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 :-)

I think so! ;-P

In the long run, I may set up the XUL/etc. to be installed into the user's
Mozilla "Chrome", and then it would be permanently resident. So it would
only be downloaded once per user, which makes efficiency less important and
Apache (hopefully) unnecessary.



-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty                           [EMAIL PROTECTED]
Physics Education Research Group              voice: 413.545.9483
Department of Physics                           fax: 413.545.4884
Univ. of Massachusetts              AIM: (available upon request)
Amherst, MA 01003-4525 USA       http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to