← All notes

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

Sources

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

Permanent ID: iil:note:sp8q3aca

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.},
}

Markdown

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.

All artifact files (JSON index)

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.