Christopher Barker wrote: > 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'
Chris: That's a good idea. Done (r6852). -Jeff > > 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 > > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ------------------------------------------------------------------------------ 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users