Reportlab Image object opens filehandles

Robin Becker robin at jessikat.fsnet.co.uk
Fri Sep 12 13:39:53 CEST 2003


In article <bjnc2k$2p1bh$1 at hades.rz.uni-saarland.de>, Michael Schmitt
<nomail at nomail.com> writes
>Hello.
>
>I am trying to build a pdf document using:
>---
>from reportlab.platypus.flowables import Image
>lst = []
>for filename in imageFiles:
>    I= Image(filename, width= 300, height= 300)
>    lst.append(I)
>---
>Creating an Image object seems to open a filehandle, so if the size of 
>imageFiles increases, I get "IOError: [Errno 24] Too many open files" on a 
>Solaris machine, where the number of simultaneously opened filehandles 
>seems to be limited to roughly 255.
>
>Is there a way to produce a pdf document with a large number of images 
>without running into the problem of too many open filehandles?
>
>Thanks for any hints.
>Michael
>
>
I have implemented an attempt at a lazy platypus Image, but haven't time
to test it right now. If you contact me I can send it you directly.
-- 
Robin Becker




More information about the Python-list mailing list