[zeromq-dev] pyzmq -> pyczmq rewrite

Michael Haberler mail17 at mah.priv.at
Sun Nov 17 20:58:28 CET 2013

Hi Michel,

just rewrote a protobuf/pyzmq Python application to use pyczmq (because I'm interested in beacon and securitiy support)

first - no surprise; great job!

just a note on the zframe wrapping:
It would be handy to have a wrapping which supports the buffer call interface (such as strings, arrays, and buffers).

In my case this popped up when deserializing a protobuf message with Message.ParseFromString(s) where s is supposed to have a len() method
I worked around it for now by wrapping zframe in a buffer object like so:

        f = zframe.recv(socket)
        m = buffer(zframe.data(f),0,zframe.size(f))
        r = Container() # my toplevel protobuf message

The other thing I noted is that handling of KeyboardInterrupt is different from pyzmq - which exits; pyczmq doesnt. Not necessarily a defect.

so, no biggies. Thanks a lot!

- Michael

More information about the zeromq-dev mailing list