[Zope-CMF] File support: some resources

Shane Hathaway shane@digicool.com
Mon, 04 Jun 2001 12:16:39 -0400


seb bacon wrote:
> PIL won't do PSDs, AFAIK.  Perhaps it's not such a bad thing to
> convert documents using command line utils via os.system() and
> friends.  Are the implications on resource usage in this scenario very
> severe, or are the real problems error handling, etc?

Actually IMHO it is much *better* to spawn a temporary process to
convert a document or image.  Converting a document or image can consume
a lot of time and memory and has a good chance of generating a
segfault.  Doing it in a separate process allows you to ulimit, kill the
process if it takes too long, and insulate Zope from memory corruption
and macro viruses and so forth.

In fact sometimes you might even want to perform the conversion on a
completely different machine with a watchdog that reboots the box if it
stops responding.  (With that strategy you could use macros in MS Office
itself to convert documents.)

I hope others agree. :-)

Shane