summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-03-17 01:24:17 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-03-17 01:24:17 (GMT)
commitbdda9f389a21244b43f8a248cb9eda02f9d80ae4 (patch)
tree535fbdda79c7cdb9d8b66935aacaf162871237c7 /Doc
parent1281f76606cc4195f57d3446b42b97063c3adc1d (diff)
downloadcpython-bdda9f389a21244b43f8a248cb9eda02f9d80ae4.zip
cpython-bdda9f389a21244b43f8a248cb9eda02f9d80ae4.tar.gz
cpython-bdda9f389a21244b43f8a248cb9eda02f9d80ae4.tar.bz2
The example files need to be opened with the "b" flag.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libcsv.tex4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/lib/libcsv.tex b/Doc/lib/libcsv.tex
index 9cf5044..24b063e 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}