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

Brian Granger ellisonbg at gmail.com
Mon Feb 22 05:38:14 CET 2010


I went ahead and implemented the select.poll interface as well as
select.select.  The implementation
was dead simple, so I didn't see any issue supporting both.  But I
agree, the select.poll interface
is probably the nicer of the two.  We are still doing some testing and
tweaking of the API, but the bindings are more-or-less
done.  Let me know if you give them a shot or have questions.



On Sun, Feb 21, 2010 at 8:34 PM, Carlos A. Rocha <carlos.rocha at gmail.com> wrote:
>> 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
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com

More information about the zeromq-dev mailing list