[zeromq-dev] pyczmq and ctx.set_linger()

Greg Ward greg at gerg.ca
Thu Jan 16 18:14:41 CET 2014


Hi all --

after successfully using czmq for the first time yesterday, I'm now
trying pyczmq. (Specifically, I'm translating the "ironhouse" example
from Pieter's blog: http://hintjens.com/blog:49.) 

I got stumped pretty quickly:

>>> import pyczmq
>>> ctx = pyczmq.zctx.new()
>>> ctx.set_linger(1000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: '_cffi_backend.CData' object has no attribute 'set_linger'

That's funny. I assumed zctx.new() would return something like a
Context object. But it doesn't:

>>> type(ctx)
<type '_cffi_backend.CData'>

What's going on here?

Thanks --

       Greg



More information about the zeromq-dev mailing list