Python select: wait for I/O on sockets, pipes, and polls
Answer: This module provides access to select and poll functions available in most operating systems.
What it covers
epoll is available on Linux. kqueue is available on most BSD. devpoll is available on Solaris.
On Windows, it only works for sockets.
On Unix, it also works on pipes and other file types.
Regular files are not a way to determine whether a file has grown since it was last read.
When to use it
The selectors module allows high-level and efficient I/O multiplexing.
That module is built upon the select module primitives.
Users are encouraged to use the selectors module instead.
Use this module when you want precise control over the OS-level primitives.
This module does not work or is not available on WebAssembly.
See also
Claims
- id: C1 claim: The module provides access to select and poll on most operating systems. source: S1 evidence: "provides access to the select() and poll() functions"
- id: C2 claim: On Windows it only works for sockets. source: S1 evidence: "on Windows, it only works for sockets"
- id: C3 claim: It cannot be used on regular files to see whether a file has grown. source: S1 evidence: "It cannot be used on regular files"
- id: C4 claim: The selectors module allows high-level I/O multiplexing built on these primitives. source: S2 evidence: "allows high-level and efficient I/O multiplexing"
Sources
- [S1] select — Waiting for I/O completion. Python Software Foundation. https://docs.python.org/3/library/select.html . License: PSF License Version 2. Accessed 2026-11-24.
- [S2] select documentation (source). CPython. https://raw.githubusercontent.com/python/cpython/main/Doc/library/select.rst . License: PSF License Version 2. Accessed 2026-11-24.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, select — Waiting for I/O completion; CPython, select documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, select — Waiting for I/O completion; CPython, select documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation.
Cite this
iinventedlight. 2026. "Python select: wait for I/O on sockets, pipes, and polls." iinventedlight Library, iil:note:sp8q3aca, version of 2026-11-24. https://iinventedlight.com/library/notes/python-select/. License: CC-BY-4.0.
@misc{iil_note_sp8q3aca,
author = {{iinventedlight}},
title = {{Python select: wait for I/O on sockets, pipes, and polls}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/python-select/},
note = {Permanent ID iil:note:sp8q3aca. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- python-select.schema.json (schema; CC-BY-4.0)
- python-select.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/python-select.md.