select
index
(built-in)

This module supports asynchronous I/O on multiple file descriptors.
 
*** IMPORTANT NOTICE ***
On Windows and OpenVMS, only sockets are supported; on Unix, all file descriptors.

 
Classes
       
__builtin__.object
epoll
exceptions.Exception(exceptions.BaseException)
error

 
class epoll(__builtin__.object)
    select.epoll([sizehint=-1])
 
Returns an epolling object
 
sizehint must be a positive integer or -1 for the default size. The
sizehint is used to optimize internal data structures. It doesn't limit
the maximum number of monitored events.
 
  Methods defined here:
__getattribute__(...)
x.__getattribute__('name') <==> x.name
close(...)
close() -> None
 
Close the epoll control file descriptor. Further operations on the epoll
object will raise an exception.
fileno(...)
fileno() -> int
 
Return the epoll control file descriptor.
modify(...)
modify(fd, eventmask) -> None
 
fd is the target file descriptor of the operation
events is a bit set composed of the various EPOLL constants
poll(...)
poll([timeout=-1[, maxevents=-1]]) -> [(fd, events), (...)]
 
Wait for events on the epoll file descriptor for a maximum time of timeout
in seconds (as float). -1 makes poll wait indefinitely.
Up to maxevents are returned to the caller.
register(...)
register(fd[, eventmask]) -> None
 
Registers a new fd or raises an IOError if the fd is already registered.
fd is the target file descriptor of the operation.
events is a bit set composed of the various EPOLL constants; the default
is EPOLL_IN | EPOLL_OUT | EPOLL_PRI.
 
The epoll interface supports all file descriptors that support poll.
unregister(...)
unregister(fd) -> None
 
fd is the target file descriptor of the operation.

Data descriptors defined here:
closed
True if the epoll handler is closed

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
fromfd = <built-in method fromfd of type object>
fromfd(fd) -> epoll
 
Create an epoll object from a given control fd.

 
class error(exceptions.Exception)
    
Method resolution order:
error
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
Functions
       
poll(...)
Returns a polling object, which supports registering and
unregistering file descriptors, and then polling them for I/O events.
select(...)
select(rlist, wlist, xlist[, timeout]) -> (rlist, wlist, xlist)
 
Wait until one or more file descriptors are ready for some kind of I/O.
The first three arguments are sequences of file descriptors to be waited for:
rlist -- wait until ready for reading
wlist -- wait until ready for writing
xlist -- wait for an ``exceptional condition''
If only one kind of condition is required, pass [] for the other lists.
A file descriptor is either a socket or file object, or a small integer
gotten from a fileno() method call on one of those.
 
The optional 4th argument specifies a timeout in seconds; it may be
a floating point number to specify fractions of seconds.  If it is absent
or None, the call will never time out.
 
The return value is a tuple of three lists corresponding to the first three
arguments; each contains the subset of the corresponding file descriptors
that are ready.
 
*** IMPORTANT NOTICE ***
On Windows and OpenVMS, only sockets are supported; on Unix, all file
descriptors can be used.

 
Data
        EPOLLERR = 8
EPOLLET = -2147483648
EPOLLHUP = 16
EPOLLIN = 1
EPOLLMSG = 1024
EPOLLONESHOT = 1073741824
EPOLLOUT = 4
EPOLLPRI = 2
EPOLLRDBAND = 128
EPOLLRDNORM = 64
EPOLLWRBAND = 512
EPOLLWRNORM = 256
PIPE_BUF = 4096
POLLERR = 8
POLLHUP = 16
POLLIN = 1
POLLMSG = 1024
POLLNVAL = 32
POLLOUT = 4
POLLPRI = 2
POLLRDBAND = 128
POLLRDNORM = 64
POLLWRBAND = 512
POLLWRNORM = 256