2014-04-19 17:37:00 +00:00
|
|
|
import select
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
ep = select.epoll()
|
2021-05-27 05:50:04 +00:00
|
|
|
ep.register(0, select.EPOLLIN, (lambda x: x, (0,)))
|
2014-04-19 17:37:00 +00:00
|
|
|
res = ep.poll(2000)
|
|
|
|
print(res)
|
|
|
|
for ev, fd in res:
|
|
|
|
print(os.read(fd, 256))
|