[Python-bugs-list] [ python-Bugs-577782 ] resire readonly memory mapped file
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 27 Aug 2002 13:09:35 -0700
Bugs item #577782, was opened at 2002-07-05 10:07
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577782&group_id=5470
Category: Windows
Group: None
Status: Open
>Resolution: Works For Me
Priority: 5
Submitted By: Grzegorz Makarewicz (makaron)
Assigned to: Tim Peters (tim_one)
Summary: resire readonly memory mapped file
Initial Comment:
When file is open as readonly and mmf if created as R/O
too, then resizing this mapping will change its
protection and desired acces to read-write.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2002-08-27 16:09
Message:
Logged In: YES
user_id=31435
Which version of Python are you talking about? Also, please
give a concrete example so we don't have to guess at what
you mean. Here's mine:
"""
import mmap
f = open('in.txt', 'rb')
m = mmap.mmap(f.fileno(), 0,
access=mmap.ACCESS_READ)
f.close()
print `m[:]`
m.resize(5)
"""
The m.resizes() attempt yields a TypeError, "mmap can't
resize a readonly or copy-on-write memory map". I tried this
under current CVS, and under 2.2.1, on Win2K.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577782&group_id=5470