[zeromq-dev] Design question: python interface for zmq_poll

Carlos A. Rocha carlos.rocha at gmail.com
Mon Feb 22 05:34:11 CET 2010


> My Python bindings have support for zmq_poll now:
>
> http://github.com/ellisonbg/pyzmq/blob/master/zmq/_zmq.pyx#L436
>
> This handles both 0MQ sockets as well as any Python object that has a fileno()
> function (sockets, files, etc.)

Awesome! Great work. Just what I was looking for.

> I am thinking of wrapping my currently version of poll into two higher
> level functions that
> mimic Python's builtin select and poll interfaces:
>
> * I would write a zmq.select function that has the same interface as
> the built-in select.select but
> calls zmq_poll underneath.
>
> * I would create a simple Python object (Poller) that has the same
> interface as the built-in select.poll.

My vote is for the select.poll interface. I find it more straightforward to use.


Best,

--
Carlos



More information about the zeromq-dev mailing list