summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/PollConstants.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/PollConstants.py')
-rw-r--r--pym/_emerge/PollConstants.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/_emerge/PollConstants.py b/pym/_emerge/PollConstants.py
new file mode 100644
index 000000000..13b5f21df
--- /dev/null
+++ b/pym/_emerge/PollConstants.py
@@ -0,0 +1,15 @@
+import select
+class PollConstants(object):
+
+ """
+ Provides POLL* constants that are equivalent to those from the
+ select module, for use by PollSelectAdapter.
+ """
+
+ names = ("POLLIN", "POLLPRI", "POLLOUT", "POLLERR", "POLLHUP", "POLLNVAL")
+ v = 1
+ for k in names:
+ locals()[k] = getattr(select, k, v)
+ v *= 2
+ del k, v
+