Given mmap's constructor declaration:
class mmap.mmap(fileno, length[, flags[, prot[, access[, offset]]]])
How do I specify both access & offset?
The documentation states:
access may be specified in lieu of flags and prot as an optional keyword parameter. It is an error to specify both flags, prot and access. See the description of access above for information on how to use this parameter.
So I've tried to do things like
mmap.mmap(file_no, length, offset, access=mmap.ACCESS_COPY)mmap.mmap(file_no, length, access=mmap.ACCESS_COPY, offset=offset)m = mmap.mmap(f.fileno(), 4, access=mmap.ACCESS_COPY, offset=2)
Traceback (most recent call last):
File "", line 1, in mmap.error: [Errno 22] Invalid argumentmmap.mmap(file_no, length, mmap.ACCESS_COPY, offset)
But I can't get it to work. Why is this confusing me so much?
mmap.mmap(file_no, length, access=mmap.ACCESS_COPY, offset=offset). What happens when you try it?