Jouni K. Seppänen <[EMAIL PROTECTED]> writes:

> Torsten Bronger <[EMAIL PROTECTED]> writes:
>
>> Does anybody has an idea at which point and why Matplotlib stops
>> working?
...
>         if not self.passed_in_file_object:
>             self.fh.close()

I wonder if we should flush a file object that was passed in... Could
you check if the following patch (committed on the trunk) helps with
your problem?

Index: lib/matplotlib/backends/backend_pdf.py
===================================================================
--- lib/matplotlib/backends/backend_pdf.py	(revision 6178)
+++ lib/matplotlib/backends/backend_pdf.py	(revision 6179)
@@ -446,7 +446,9 @@
         self.writeMarkers()
         self.writeXref()
         self.writeTrailer()
-        if not self.passed_in_file_object:
+        if self.passed_in_file_object:
+            self.fh.flush()
+        else:
             self.fh.close()
 
     def write(self, data):
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to