John Hunter wrote:
> On Mon, Jan 26, 2009 at 1:10 PM, Christopher Barker

>> Shouldn't csv2rec open files in Universal mode by default anyway?
> 
> The only down side I can see to this is universal support can be
> disabled at build time, though it is on by default.  At least this is
> my interpretation of
> 
>   http://www.python.org/dev/peps/pep-0278/

well, that was 7 years ago (wow!), I don't know if anyone turns it off 
now, but in any case, so what? it'll act like it does now ( open() 
ignores flags it doesn't understand -- at least it did )

> It's a pretty rare bug (in my experience and I work on linux, unix and
> os x and freqeuently with excel files) with an easy workaround (pass
> in your own file handle) so I am not sure we need a fix here.

But why the heck not? and according to the OP, Excel does create such files.

Personally, I try to ALWAYS use 'U' when opening text files -- it can 
save headaches, and I see no downside. It really should be the default 
-- it's not, because the default was always text, but that was the same 
as binary on *nix -- so there is a lot of *nix code out there opening 
binary files without the 'b' flag. So we couldn't change the default 
back in 2002, it would have broken a LOT of code.

-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

chris.bar...@noaa.gov

------------------------------------------------------------------------------
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

Reply via email to