| |
- __builtin__.object
-
- mmap
- exceptions.EnvironmentError(exceptions.StandardError)
-
- error
class mmap(__builtin__.object) |
|
Windows: mmap(fileno, length[, tagname[, access[, offset]]])
Maps length bytes from the file specified by the file handle fileno,
and returns a mmap object. If length is larger than the current size
of the file, the file is extended to contain length bytes. If length
is 0, the maximum length of the map is the current size of the file,
except that if the file is empty Windows raises an exception (you cannot
create an empty mapping on Windows).
Unix: mmap(fileno, length[, flags[, prot[, access[, offset]]]])
Maps length bytes from the file specified by the file descriptor fileno,
and returns a mmap object. If length is 0, the maximum length of the map
will be the current size of the file when mmap is called.
flags specifies the nature of the mapping. MAP_PRIVATE creates a
private copy-on-write mapping, so changes to the contents of the mmap
object will be private to this process, and MAP_SHARED creates a mapping
that's shared with all other processes mapping the same areas of the file.
The default value is MAP_SHARED.
To map anonymous memory, pass -1 as the fileno (both versions). |
|
Methods defined here:
- __add__(...)
- x.__add__(y) <==> x+y
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __delslice__(...)
- x.__delslice__(i, j) <==> del x[i:j]
Use of negative indices is not supported.
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __getslice__(...)
- x.__getslice__(i, j) <==> x[i:j]
Use of negative indices is not supported.
- __len__(...)
- x.__len__() <==> len(x)
- __mul__(...)
- x.__mul__(n) <==> x*n
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __setslice__(...)
- x.__setslice__(i, j, y) <==> x[i:j]=y
Use of negative indices is not supported.
- close(...)
- find(...)
- flush(...)
- move(...)
- read(...)
- read_byte(...)
- readline(...)
- resize(...)
- rfind(...)
- seek(...)
- size(...)
- tell(...)
- write(...)
- write_byte(...)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |