Package portage :: Package util :: Package _eventloop :: Module PollConstants
[hide private]

Source Code for Module portage.util._eventloop.PollConstants

 1  # Copyright 1999-2009 Gentoo Foundation 
 2  # Distributed under the terms of the GNU General Public License v2 
 3   
 4  import select 
5 -class PollConstants(object):
6 7 """ 8 Provides POLL* constants that are equivalent to those from the 9 select module, for use by PollSelectAdapter. 10 """ 11 12 names = ("POLLIN", "POLLPRI", "POLLOUT", "POLLERR", "POLLHUP", "POLLNVAL") 13 v = 1 14 for k in names: 15 locals()[k] = getattr(select, k, v) 16 v *= 2 17 del k, v
18