[ python-Bugs-964876 ] mapping a 0 length file

SourceForge.net noreply at sourceforge.net
Wed Jun 2 05:28:09 EDT 2004


Bugs item #964876, was opened at 2004-06-02 09:28
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=964876&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Manlio Perillo (manlioperillo)
Assigned to: Nobody/Anonymous (nobody)
Summary: mapping a 0 length file

Initial Comment:
>>> sys.version
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit
(Intel)]'
>>> sys.platform
'win32'
>>> sys.getwindowsversion()
(5, 1, 2600, 2, '')

Hi.
If I mmap a 0 length file on winnt, I obtain an exception:

>>> import mmap, os

>>> file = os.open(file_name, os.O_RDWR | os.O_BINARY)
>>> buf = mmap.mmap(file, 0, access = map.ACCESS_WRITE)

Traceback (most recent call last):
  File "<pyshell#15>", line 1, in -toplevel-
    buf = mmap.mmap(file, 0, access = mmap.ACCESS_WRITE)
WindowsError: [Errno 1006] Il volume corrispondente al
file è stato alterato dall'esterno. Il file aperto non
è più valido


This is a windows problem, but I think it should be at
least documented.



Thanks and regards   Manlio Perillo

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=964876&group_id=5470



More information about the Python-bugs-list mailing list