micropython-lib/select/test_epoll.py

11 wiersze
155 B
Python
Czysty Zwykły widok Historia

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