This simple python code:
import mmap
with file("o:/temp/mmap.test", "w+b") as fp:
m = mmap.mmap(fp.fileno(), 0, access=mmap.ACCESS_READ|mmap.ACCESS_WRITE)
m.write("Hello world!")
Produces the following error (on the mmap.mmap(...) line):
WindowsError: [Error 1006] The volume for a file has been externally altered so that the opened file is no longer valid
Any idea why?