Timeline for Amend a csv file in Python
Current License: CC BY-SA 2.5
Post Revisions
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 5, 2010 at 19:23 | comment | added | S.Lott | -1: "I can't really disclose what system I'm working on". Can't possibly be true unless it was a seekrit custom-built operating system where disclosure of status as the only client would somehow violate national security. Otherwise, it's difficult to be sure of an answer when there's this kind of refusal to disclose basic facts. | |
| Nov 5, 2010 at 18:44 | comment | added | S.Lott | @systempuntoout: In an obscure way, yes. From docs.python.org/library/csv.html#csv.writer. "If csvfile is a file object, it must be opened with the ‘b’ flag on platforms where that makes a difference." And the platform where it makes a difference is? You guessed it. Windows. | |
| Nov 5, 2010 at 17:57 | comment | added | systempuntoout | @S.Lott uh, csv is binary in Windows? | |
| Nov 5, 2010 at 15:51 | comment | added | S.Lott | "and csv is typically not binary". Since for Windows it is binary, it's simpler to open CSV with "wb" to assure compatibility. | |
| Nov 5, 2010 at 15:14 | comment | added | systempuntoout | You are not developing in Windows, isn't it? Because "rb" means read+binary and csv is tipically not binary. This probably works because you are developing on a system that does not differentiate between binary and text files (ie b has no effect). | |
| Nov 5, 2010 at 15:14 | vote | accept | ingh.am | ||
| Nov 5, 2010 at 15:06 | history | edited | ingh.am | CC BY-SA 2.5 |
deleted 9 characters in body
|
| Nov 5, 2010 at 15:02 | answer | added | systempuntoout | timeline score: 9 | |
| Nov 5, 2010 at 14:59 | history | asked | ingh.am | CC BY-SA 2.5 |