From: Skip Montanaro Date: Wed, 17 Mar 2004 01:24:17 +0000 (+0000) Subject: The example files need to be opened with the "b" flag. X-Git-Tag: v2.4a1~690 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdda9f389a21244b43f8a248cb9eda02f9d80ae4;p=thirdparty%2FPython%2Fcpython.git The example files need to be opened with the "b" flag. --- diff --git a/Doc/lib/libcsv.tex b/Doc/lib/libcsv.tex index 9cf5044c64f6..24b063e776d7 100644 --- a/Doc/lib/libcsv.tex +++ b/Doc/lib/libcsv.tex @@ -312,7 +312,7 @@ The ``Hello, world'' of csv reading is \begin{verbatim} import csv -reader = csv.reader(file("some.csv")) +reader = csv.reader(file("some.csv", "rb")) for row in reader: print row \end{verbatim} @@ -321,7 +321,7 @@ The corresponding simplest possible writing example is \begin{verbatim} import csv -writer = csv.writer(file("some.csv", "w")) +writer = csv.writer(file("some.csv", "wb")) for row in someiterable: writer.writerow(row) \end{verbatim}