If you're using Python 3.4+, select.epoll already supports context — you're clear to just write with epoll() as E: … and everything will be OK. If not, here's how to shim it:
If you're using Python 3.4+, select.epoll already supports context — you're clear to just write with epoll() as E: … and everything will be OK. If not, here's how to shim it: