[Python-bugs-list] [ python-Bugs-577782 ] resize readonly memory mapped file
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 10 Sep 2002 09:22:28 -0700
Bugs item #577782, was opened at 2002-07-05 16: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: resize 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: Grzegorz Makarewicz (makaron)
Date: 2002-09-10 18:22
Message:
Logged In: YES
user_id=115179
Sorry, i was out of internet ;(
My python is 2.1 on windows, under 2.2 or cvs MMF works as
expected - my fault.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-09-10 16:57
Message:
Logged In: YES
user_id=31435
If the requested followup info isn't forthcoming, I can only
close this as Irreproducible.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-08-27 22: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