Carl Karsten wrote: > I am trying to convert a pdf (data in string, not disk file) to a png. This > will be run in a django view on a server (PyCon's even) so it would be good > if > it didn't hit the disk as much. Shouldn't I be able to use .tostring if I > can > use .save?
use cStringIO. http://docs.python.org/lib/module-StringIO.html It might not make much difference, because your OS should be caching the file in memory anyway, and letting you read it back before it is actually written to disk. If you are sure it is a disk problem, you could set it up to write to a ram file system (e.g. tmpfs on linux), which would help the PDF conversion too. Otherwise you could see if it possible to communicate with the convert script using pipes, rather than system(). That will cut out a few reads and writes. Douglas _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig