[zeromq-dev] Python Binding Modules

Justin Cook jhcook at gmail.com
Wed Feb 29 16:46:27 CET 2012


Hi there again,

I have built ZMQ RPM from 3.1.0-beta and PyZMQ 2.1.11. They
successfully install, import, and run. But, It seems some of the
namespace is missing. The one I'm particularly interested in is
eventloop.

If I'm missing some documentation, it would be greatly appreciated if
I was kicked in the right place. Cheers.

----- BEGIN -----

>>> pprint(zmq.__dict__)
{'AFFINITY': 4,
 'BACKLOG': 19,
 'Context': <type 'zmq.core.context.Context'>,
 'DEALER': 5,
 'DONTWAIT': 1,
 'EADDRINUSE': 98,
 'EADDRNOTAVAIL': 99,
 'EAGAIN': 11,
 'ECONNREFUSED': 111,
 'EFAULT': 14,
 'EFSM': 156384763,
 'EINPROGRESS': 115,
 'EINVAL': 22,
 'EMTHREAD': 156384766,
 'ENETDOWN': 100,
 'ENOBUFS': 105,
 'ENOCOMPATPROTO': 156384764,
 'ENODEV': 19,
 'ENOMEM': 12,
 'ENOTSOCK': 88,
 'ENOTSUP': 95,
 'EPROTONOSUPPORT': 93,
 'ETERM': 156384765,
 'EVENTS': 15,
 'FD': 14,
 'FORWARDER': 2,
 'IDENTITY': 5,
 'LINGER': 17,
 'MAXMSGSIZE': 22,
 'MULTICAST_HOPS': 25,
 'Message': <type 'zmq.core.message.Message'>,
 'MessageTracker': <type 'zmq.core.message.MessageTracker'>,
 'NOBLOCK': 1,
 'NotDone': <class 'zmq.core.error.NotDone'>,
 'PAIR': 0,
 'POLLERR': 4,
 'POLLIN': 1,
 'POLLOUT': 2,
 'PUB': 1,
 'PULL': 7,
 'PUSH': 8,
 'Poller': <class 'zmq.core.poll.Poller'>,
 'QUEUE': 3,
 'RATE': 8,
 'RCVBUF': 12,
 'RCVHWM': 24,
 'RCVMORE': 13,
 'RCVTIMEO': 27,
 'RECONNECT_IVL': 18,
 'RECONNECT_IVL_MAX': 21,
 'RECOVERY_IVL': 9,
 'REP': 4,
 'REQ': 3,
 'ROUTER': 6,
 'SNDBUF': 11,
 'SNDHWM': 23,
 'SNDMORE': 2,
 'SNDTIMEO': 28,
 'STREAMER': 1,
 'SUB': 2,
 'SUBSCRIBE': 6,
 'Socket': <type 'zmq.core.socket.Socket'>,
 'Stopwatch': <type 'zmq.core.stopwatch.Stopwatch'>,
 'TYPE': 16,
 'UNSUBSCRIBE': 7,
 'XPUB': 9,
 'XREP': 6,
 'XREQ': 5,
 'XSUB': 10,
 'ZMQBaseError': <class 'zmq.core.error.ZMQBaseError'>,
 'ZMQBindError': <class 'zmq.core.error.ZMQBindError'>,
 'ZMQError': <class 'zmq.core.error.ZMQError'>,
 '__all__': ['get_includes',
             'NOBLOCK',
             'DONTWAIT',
             'FD',
             'EVENTS',
             'TYPE',
             'LINGER',
             'RECONNECT_IVL',
             'BACKLOG',
             'PAIR',
             'PUB',
             'SUB',
             'XPUB',
             'XSUB',
             'REQ',
             'REP',
             'XREQ',
             'DEALER',
             'XREP',
             'ROUTER',
             'PULL',
             'PUSH',
             'AFFINITY',
             'SUBSCRIBE',
             'UNSUBSCRIBE',
             'RATE',
             'RECOVERY_IVL',
             'RECONNECT_IVL_MAX',
             'SNDBUF',
             'RCVBUF',
             'SNDMORE',
             'RCVMORE',
             'POLLIN',
             'POLLOUT',
             'POLLERR',
             'STREAMER',
             'FORWARDER',
             'QUEUE',
             'EAGAIN',
             'EINVAL',
             'ENOTSUP',
             'EPROTONOSUPPORT',
             'ENOBUFS',
             'ENETDOWN',
             'EADDRINUSE',
             'EADDRNOTAVAIL',
             'ECONNREFUSED',
             'EINPROGRESS',
             'ENOTSOCK',
             'EFSM',
             'ENOCOMPATPROTO',
             'ETERM',
             'EMTHREAD',
             'EFAULT',
             'ENOMEM',
             'ENODEV',
             'bytes_sockopts',
             'int_sockopts',
             'int64_sockopts',
             'MAXMSGSIZE',
             'SNDHWM',
             'RCVHWM',
             'MULTICAST_HOPS',
             'RCVTIMEO',
             'SNDTIMEO',
             'IDENTITY',
             'strerror',
             'ZMQBaseError',
             'ZMQBindError',
             'ZMQError',
             'NotDone',
             'MessageTracker',
             'Message',
             'Context',
             'Socket',
             'Poller',
             'select',
             'Stopwatch',
             'zmq_version',
             'zmq_version_info',
             'pyzmq_version',
             'pyzmq_version_info',
             '__version__',
             '__revision__',
             'device'],
 '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
                  'AssertionError': <type 'exceptions.AssertionError'>,
                  'AttributeError': <type 'exceptions.AttributeError'>,
                  'BaseException': <type 'exceptions.BaseException'>,
                  'BufferError': <type 'exceptions.BufferError'>,
                  'BytesWarning': <type 'exceptions.BytesWarning'>,
                  'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
                  'EOFError': <type 'exceptions.EOFError'>,
                  'Ellipsis': Ellipsis,
                  'EnvironmentError': <type 'exceptions.EnvironmentError'>,
                  'Exception': <type 'exceptions.Exception'>,
                  'False': False,
                  'FloatingPointError': <type 'exceptions.FloatingPointError'>,
                  'FutureWarning': <type 'exceptions.FutureWarning'>,
                  'GeneratorExit': <type 'exceptions.GeneratorExit'>,
                  'IOError': <type 'exceptions.IOError'>,
                  'ImportError': <type 'exceptions.ImportError'>,
                  'ImportWarning': <type 'exceptions.ImportWarning'>,
                  'IndentationError': <type 'exceptions.IndentationError'>,
                  'IndexError': <type 'exceptions.IndexError'>,
                  'KeyError': <type 'exceptions.KeyError'>,
                  'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
                  'LookupError': <type 'exceptions.LookupError'>,
                  'MemoryError': <type 'exceptions.MemoryError'>,
                  'NameError': <type 'exceptions.NameError'>,
                  'None': None,
                  'NotImplemented': NotImplemented,
                  'NotImplementedError': <type
'exceptions.NotImplementedError'>,
                  'OSError': <type 'exceptions.OSError'>,
                  'OverflowError': <type 'exceptions.OverflowError'>,
                  'PendingDeprecationWarning': <type
'exceptions.PendingDeprecationWarning'>,
                  'ReferenceError': <type 'exceptions.ReferenceError'>,
                  'RuntimeError': <type 'exceptions.RuntimeError'>,
                  'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
                  'StandardError': <type 'exceptions.StandardError'>,
                  'StopIteration': <type 'exceptions.StopIteration'>,
                  'SyntaxError': <type 'exceptions.SyntaxError'>,
                  'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
                  'SystemError': <type 'exceptions.SystemError'>,
                  'SystemExit': <type 'exceptions.SystemExit'>,
                  'TabError': <type 'exceptions.TabError'>,
                  'True': True,
                  'TypeError': <type 'exceptions.TypeError'>,
                  'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
                  'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
                  'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
                  'UnicodeError': <type 'exceptions.UnicodeError'>,
                  'UnicodeTranslateError': <type
'exceptions.UnicodeTranslateError'>,
                  'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
                  'UserWarning': <type 'exceptions.UserWarning'>,
                  'ValueError': <type 'exceptions.ValueError'>,
                  'Warning': <type 'exceptions.Warning'>,
                  'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
                  '_': {'__builtins__': <Recursion on dict with id=32562944>,
                        '__doc__': None,
                        '__file__':
'/usr/lib64/python2.6/site-packages/zmq/utils/__init__.pyc',
                        '__name__': 'zmq.utils',
                        '__package__': None,
                        '__path__':
['/usr/lib64/python2.6/site-packages/zmq/utils'],
                        'initthreads': <module 'zmq.utils.initthreads'
from '/usr/lib64/python2.6/site-packages/zmq/utils/initthreads.so'>,
                        'jsonapi': <module 'zmq.utils.jsonapi' from
'/usr/lib64/python2.6/site-packages/zmq/utils/jsonapi.pyc'>,
                        'strtypes': <module 'zmq.utils.strtypes' from
'/usr/lib64/python2.6/site-packages/zmq/utils/strtypes.pyc'>},
                  '__debug__': True,
                  '__doc__': "Built-in functions, exceptions, and
other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis
represents `...' in slices.",
                  '__import__': <built-in function __import__>,
                  '__name__': '__builtin__',
                  '__package__': None,
                  'abs': <built-in function abs>,
                  'all': <built-in function all>,
                  'any': <built-in function any>,
                  'apply': <built-in function apply>,
                  'basestring': <type 'basestring'>,
                  'bin': <built-in function bin>,
                  'bool': <type 'bool'>,
                  'buffer': <type 'buffer'>,
                  'bytearray': <type 'bytearray'>,
                  'bytes': <type 'str'>,
                  'callable': <built-in function callable>,
                  'chr': <built-in function chr>,
                  'classmethod': <type 'classmethod'>,
                  'cmp': <built-in function cmp>,
                  'coerce': <built-in function coerce>,
                  'compile': <built-in function compile>,
                  'complex': <type 'complex'>,
                  'copyright': Copyright (c) 2001-2010 Python Software
Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.,
                  'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope
Corporation and a cast of thousands
    for supporting Python development.  See www.python.org for more
information.,
                  'delattr': <built-in function delattr>,
                  'dict': <type 'dict'>,
                  'dir': <built-in function dir>,
                  'divmod': <built-in function divmod>,
                  'enumerate': <type 'enumerate'>,
                  'eval': <built-in function eval>,
                  'execfile': <built-in function execfile>,
                  'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
                  'file': <type 'file'>,
                  'filter': <built-in function filter>,
                  'float': <type 'float'>,
                  'format': <built-in function format>,
                  'frozenset': <type 'frozenset'>,
                  'getattr': <built-in function getattr>,
                  'globals': <built-in function globals>,
                  'hasattr': <built-in function hasattr>,
                  'hash': <built-in function hash>,
                  'help': Type help() for interactive help, or
help(object) for help about object.,
                  'hex': <built-in function hex>,
                  'id': <built-in function id>,
                  'input': <built-in function input>,
                  'int': <type 'int'>,
                  'intern': <built-in function intern>,
                  'isinstance': <built-in function isinstance>,
                  'issubclass': <built-in function issubclass>,
                  'iter': <built-in function iter>,
                  'len': <built-in function len>,
                  'license': See http://www.python.org/2.6/license.html,
                  'list': <type 'list'>,
                  'locals': <built-in function locals>,
                  'long': <type 'long'>,
                  'map': <built-in function map>,
                  'max': <built-in function max>,
                  'min': <built-in function min>,
                  'next': <built-in function next>,
                  'object': <type 'object'>,
                  'oct': <built-in function oct>,
                  'open': <built-in function open>,
                  'ord': <built-in function ord>,
                  'pow': <built-in function pow>,
                  'print': <built-in function print>,
                  'property': <type 'property'>,
                  'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
                  'range': <built-in function range>,
                  'raw_input': <built-in function raw_input>,
                  'reduce': <built-in function reduce>,
                  'reload': <built-in function reload>,
                  'repr': <built-in function repr>,
                  'reversed': <type 'reversed'>,
                  'round': <built-in function round>,
                  'set': <type 'set'>,
                  'setattr': <built-in function setattr>,
                  'slice': <type 'slice'>,
                  'sorted': <built-in function sorted>,
                  'staticmethod': <type 'staticmethod'>,
                  'str': <type 'str'>,
                  'sum': <built-in function sum>,
                  'super': <type 'super'>,
                  'tuple': <type 'tuple'>,
                  'type': <type 'type'>,
                  'unichr': <built-in function unichr>,
                  'unicode': <type 'unicode'>,
                  'vars': <built-in function vars>,
                  'xrange': <type 'xrange'>,
                  'zip': <built-in function zip>},
 '__doc__': 'Python bindings for 0MQ.',
 '__file__': '/usr/lib64/python2.6/site-packages/zmq/__init__.pyc',
 '__name__': 'zmq',
 '__package__': 'zmq',
 '__path__': ['/usr/lib64/python2.6/site-packages/zmq'],
 '__revision__': '',
 '__version__': '2.1.11',
 'bytes_sockopts': [6, 7, 5],
 'core': <module 'zmq.core' from
'/usr/lib64/python2.6/site-packages/zmq/core/__init__.pyc'>,
 'device': <built-in function device>,
 'devices': <module 'zmq.devices' from
'/usr/lib64/python2.6/site-packages/zmq/devices/__init__.pyc'>,
 'get_includes': <function get_includes at 0x7f32977ed758>,
 'initthreads': <module 'zmq.utils.initthreads' from
'/usr/lib64/python2.6/site-packages/zmq/utils/initthreads.so'>,
 'int64_sockopts': [4, 22],
 'int_sockopts': [21,
                  8,
                  9,
                  11,
                  12,
                  13,
                  23,
                  24,
                  25,
                  27,
                  28,
                  15,
                  16,
                  17,
                  18,
                  19],
 'pyzmq_version': <built-in function pyzmq_version>,
 'pyzmq_version_info': <built-in function pyzmq_version_info>,
 'select': <built-in function select>,
 'strerror': <built-in function strerror>,
 'sys': <module 'sys' (built-in)>,
 'utils': <module 'zmq.utils' from
'/usr/lib64/python2.6/site-packages/zmq/utils/__init__.pyc'>,
 'zmq_version': <built-in function zmq_version>,
 'zmq_version_info': <built-in function zmq_version_info>}


----- END -----


-- 
Justin Cook

http://www.linkedin.com/in/jhcook



More information about the zeromq-dev mailing list