Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Select made easy

Project description



.. contents:: **Table of Contents**
:backlinks: none


selectz is distributed on PyPI_ as a universal wheel and is available on
Linux/macOS and Windows and supports Python 2.7/3.5+ and PyPy.

.. code-block:: bash

$ pip install selectz


Modified Python 3 selectors example_ using `selectz`.

.. code-block:: python

import selectz
import socket

sel = selectz.Selector()

def accept(sock):
conn, addr = sock.accept() # Should be ready
print('accepted', conn, 'from', addr)
sel.register('read', conn, read)

def read(conn):
data = conn.recv(1000) # Should be ready
if data:
print('echoing', repr(data), 'to', conn)
conn.send(data) # Hope it won't block
print('closing', conn)

sock = socket.socket()
sock.bind(('localhost', 1234))
sel.register('read', sock, accept)

while True:


selectz is distributed under the terms of both

- MIT_ License
- Apache_ License, Version 2.0

at your option.

.. _PYPI:
.. _example:
.. _MIT:
.. _Apache:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for selectz, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size selectz-1.0.2.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page