Staging: this is not the live site, pydocs.org.
Networking and Interprocess Communication mmap not WASI
Memory-mapped file objects behave like both bytearray and like file objects. You can use mmap objects in most places where bytearray are expected; for example, you can use the re module to search through a memory-mapped file. You can also change a single byte by doing obj[index] = 97, or change a subsequence by assigning to a slice: obj[i1:i2] = b'...'. You can also read and write data starting at the current file position, and seek() through the file to different positions. © Python Software Foundation. PSF License Version 2 · Official docs ↗
Symbols in mmap a ACCESS_COPY These constants specify the access mode for a memory mapping. ACCESS_DEFAULT These constants specify the access mode for a memory mapping. ACCESS_READ These constants specify the access mode for a memory mapping. ACCESS_WRITE These constants specify the access mode for a memory mapping. m MADV_CORE These options can be passed to mmap.madvise(). MADV_DODUMP These options can be passed to mmap.madvise(). MADV_DOFORK These options can be passed to mmap.madvise(). MADV_FREE These options can be passed to mmap.madvise(). MADV_NOCORE These options can be passed to mmap.madvise(). MADV_NORMAL These options can be passed to mmap.madvise(). MADV_NOSYNC These options can be passed to mmap.madvise(). MADV_RANDOM These options can be passed to mmap.madvise(). MADV_REMOVE These options can be passed to mmap.madvise(). MAP_32BIT These are the various flags that can be passed to mmap.mmap(). MAP_ANON These are the various flags that can be passed to mmap.mmap(). MAP_ANONYMOUS These are the various flags that can be passed to mmap.mmap(). MAP_CONCEAL These are the various flags that can be passed to mmap.mmap(). MAP_DENYWRITE These are the various flags that can be passed to mmap.mmap(). MAP_EXECUTABLE These are the various flags that can be passed to mmap.mmap(). MAP_JIT These are the various flags that can be passed to mmap.mmap(). MAP_NOCACHE These are the various flags that can be passed to mmap.mmap(). MAP_NOEXTEND These are the various flags that can be passed to mmap.mmap(). MAP_NORESERVE These are the various flags that can be passed to mmap.mmap(). MAP_POPULATE These are the various flags that can be passed to mmap.mmap(). MAP_PRIVATE These are the various flags that can be passed to mmap.mmap(). MAP_SHARED These are the various flags that can be passed to mmap.mmap(). MAP_STACK These are the various flags that can be passed to mmap.mmap(). MAP_TPRO These are the various flags that can be passed to mmap.mmap(). MAP_UNIX03 These are the various flags that can be passed to mmap.mmap(). mmap Windows: mmap(fileno, length[, tagname[, access[, offset[, trackfd]]]]) MS_ASYNC These flags control the synchronization behavior for mmap.flush(): MS_INVALIDATE These flags control the synchronization behavior for mmap.flush(): MS_SYNC These flags control the synchronization behavior for mmap.flush(): p PAGESIZE PAGESIZE is the system memory page size in bytes. PROT_EXEC Memory protection flags accepted by the prot argument of mmap. PROT_READ Memory protection flags accepted by the prot argument of mmap. PROT_WRITE Memory protection flags accepted by the prot argument of mmap.
Python docs © Python Software Foundation · Examples CC0 ·
Source on GitHub · Not affiliated with the PSF