Networking & Interprocess Communication
mmap — Memory-mapped file support
Memory-mapped file objects behave like both
and like bytearray
file objects
. You can use mmap objects in most places where
are expected; for example, you can use the bytearray
module to search through a memory-mapped file. You can also change a single byte by doing re
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.
signal — Set handlers for asynchronous events
This module provides mechanisms to use signal handlers in Python.
asynchat — Asynchronous socket command/response handler
Source code: Lib/asynchat.py
asyncore — Asynchronous socket handler
Source code: Lib/asyncore.py
ssl — TLS/SSL wrapper for socket objects
Source code: Lib/ssl.py
socket — Low-level networking interface
Source code: Lib/socket.py