Is there a reason for storing the PostScript data in a
> string first? Otherwise I could just pass the real file
> handle to RendererPS and it would write all the stuff
> directly into the output file.
The reason I did it (I think) was for efficiency, (wrongly) thinking
it would be faster to write to StringIO than to a file object. Of
course, file objects buffer their output, so this is not a real
consideration. I think its fine to make the change you suggested -
while you're in there, I suggest supporting writing to a file object
as well as a filename, as agg does now. All backends should support
this.
JDH
Hello,
> Is there a reason for storing the PostScript data in a
> string first? Otherwise I could just pass the real file
> handle to RendererPS and it would write all the stuff
> directly into the output file.
The reason I did it (I think) was for efficiency, (wrongly) thinking
it would be faster to write to StringIO than to a file object. Of
course, file objects buffer their output, so this is not a real
consideration. I think its fine to make the change you suggested -
I found a good reason for storing the PS in a string first:
we have to process all of the figure before we write the PostScript
prologue. Otherwise there is no good way to know which fonts
to include in the PostScript file
I reverted my change for now, we are back to storing the PostScript
data temporarily in a string.
All the best,
Jochen
···
On Tue, Nov 02, 2004 at 12:41:03PM -0600, John Hunter wrote:
--