Networking and Internet Modules

select

Waits for descriptor readiness, with platform-dependent polling mechanisms. Readiness does not guarantee a whole message is available. The zero-timeout example polls empty sets on POSIX; Windows select requires sockets and nonempty sets.

Formal Syntax & Structure

python syntaxpython
import select

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
import selectprint(select.select([], [], [], 0))
Python Reference