[zeromq-dev] czmq python binding Zpoller

Johan Philips johan.philips at kuleuven.be
Tue Nov 3 05:42:17 CET 2015

Hi guys

I am trying to use the Zpoller class from the python binding together 
with the zyre binding. Following minimal example fails for me:

 >>> from czmq import Zpoller
 >>> from zyre import Zyre
 >>> node = Zyre("test")
 >>> node.start()
 >>> poller = Zpoller(node.socket(), None)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/jphilips/workspace/czmq/bindings/python/czmq.py", line 
1782, in __init__
     self._as_parameter_ = lib.zpoller_new(args[0], *args[index()-1:]) # 
Creation of new raw type
NameError: global name 'index' is not defined

There seems to be something strange going on in this zpoller_new call. 
Shouldn't it be *args[-1:], i.e. without the index()?

Or how does one use this Zpoller, because I am confused at the moment :-)



More information about the zeromq-dev mailing list