Jeff Whitaker wrote:
> Chris: Here's a self-contained example of the problem (data file
> attached):
yup -- I get the same problem. Interesting, I thought it might be an
issue with the 'U' flag creating a difference in byte offset, but that's
a unix style file already, so it should make no difference anyway -- weird.
Actually, what's probably happening is that the flags are getting passed
in to how python is opening the gzip file itself, in which case, yes,
'U' would, or course, break things.
In the MPL code, is the flag passed on through to either file() or
gzip.open() that same way? What I'm getting at is whether it's easy to
use 'U' with raw text files and not with gzipped files.
In my grepping of the code (SVN head), I only see gzip.open being called
"raw", either with no flags or 'wb', except in mlab.cbook, and I see you
(or someone!) already patched that. However, I might suggest:
flag = flag.replace('U','')
instead of:
if flag == 'rU': flag = 'r'
it case someone passes a U in some other way (not that I know of any
other valid way...)
Now I wonder if I can find the energy to submit a bug report to Python...
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[email protected]
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users