python 3 support; not stable yet

This commit is contained in:
clowwindy 2014-10-31 18:28:22 +08:00
parent 0814888ba5
commit 2a53b67c65
17 changed files with 204 additions and 115 deletions

View file

@ -24,6 +24,8 @@
# from ssloop
# https://github.com/clowwindy/ssloop
from __future__ import absolute_import, division, print_function, \
with_statement
import os
import socket
@ -100,7 +102,7 @@ class KqueueLoop(object):
results[fd] |= POLL_IN
elif e.filter == select.KQ_FILTER_WRITE:
results[fd] |= POLL_OUT
return results.iteritems()
return results.items()
def add_fd(self, fd, mode):
self._fds[fd] = mode