Revision: 7192
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7192&view=rev
Author: jdh2358
Date: 2009-06-07 13:55:10 +0000 (Sun, 07 Jun 2009)
Log Message:
-----------
add support for bz2 files per sf support request 2794556
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-06-07 13:46:10 UTC (rev
7191)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-06-07 13:55:10 UTC (rev
7192)
@@ -314,6 +314,11 @@
# get rid of 'U' in flag for gzipped files.
flag = flag.replace('U','')
fh = gzip.open(fname, flag)
+ elif fname.endswith('.bz2'):
+ # get rid of 'U' in flag for bz2 files
+ flag = flag.replace('U','')
+ import bz2
+ fh = bz2.BZ2File(fname, flag)
else:
fh = file(fname, flag)
opened = True
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins