Revision: 6846
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6846&view=rev
Author:   jswhit
Date:     2009-01-29 16:16:14 +0000 (Thu, 29 Jan 2009)

Log Message:
-----------
make default mode 'r' for gzipped files, since 'rU' apparently is not 
supported in the gzip module (at least in python 2.5.2)

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/cbook.py

Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py    2009-01-28 20:39:18 UTC (rev 
6845)
+++ trunk/matplotlib/lib/matplotlib/cbook.py    2009-01-29 16:16:14 UTC (rev 
6846)
@@ -311,6 +311,8 @@
     if is_string_like(fname):
         if fname.endswith('.gz'):
             import gzip
+            # universal newline mode doesn't work for gzipped files.
+            if flag == 'rU': flag = 'r'
             fh = gzip.open(fname, flag)
         else:
             fh = file(fname, flag)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to