[Python-checkins] r70061 - python/trunk/Doc/library/mmap.rst
hirokazu.yamamoto
python-checkins at python.org
Sat Feb 28 16:24:00 CET 2009
Author: hirokazu.yamamoto
Date: Sat Feb 28 16:24:00 2009
New Revision: 70061
Log:
Binary flag is needed on windows.
Modified:
python/trunk/Doc/library/mmap.rst
Modified: python/trunk/Doc/library/mmap.rst
==============================================================================
--- python/trunk/Doc/library/mmap.rst (original)
+++ python/trunk/Doc/library/mmap.rst Sat Feb 28 16:24:00 2009
@@ -99,10 +99,10 @@
import mmap
# write a simple example file
- with open("hello.txt", "w") as f:
+ with open("hello.txt", "wb") as f:
f.write("Hello Python!\n")
- with open("hello.txt", "r+") as f:
+ with open("hello.txt", "r+b") as f:
# memory-map the file, size 0 means whole file
map = mmap.mmap(f.fileno(), 0)
# read content via standard file methods
More information about the Python-checkins
mailing list