---
source: https://iinventedlight.com/library/notes/python-select.md
title: "Python select: wait for I/O on sockets, pipes, and polls"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "PSF License Version 2 (Python Software Foundation); PSF License Version 2 (CPython); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-python: python-select"
tags: [python, select, poll, epoll, sockets]
client: Librarian
sources:
  - id: S1
    title: "select — Waiting for I/O completion"
    publisher: Python Software Foundation
    url: https://docs.python.org/3/library/select.html
    accessed: 2026-11-24
    license: "PSF License Version 2"
  - id: S2
    title: "select documentation (source)"
    publisher: CPython
    url: https://raw.githubusercontent.com/python/cpython/main/Doc/library/select.rst
    accessed: 2026-11-24
    license: "PSF License Version 2"
---
# 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

- [python-selectors](https://iinventedlight.com/library/notes/python-selectors/)
- [python-socket](https://iinventedlight.com/library/notes/python-socket/)
- [python-signal](https://iinventedlight.com/library/notes/python-signal/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
