diff --git a/README.md b/README.md index 5788325..10ecda7 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,22 @@ The following versions of Python are supported CPython 2.6+, 3.2+ and Pypy 2.1.0 Bugs and change requests can be made [here](https://github.com/tonysimpson/nanomsg-python/issues). - nanommsg library in /usr/local ============================== -If you're nanomsg is in /usr/local and your machine is not configured to find it there you can rename the usr_local_setup.cfg to setup.cfg to fix the problem. +If your nanomsg is in /usr/local and your machine is not configured to find it there you can rename the usr_local_setup.cfg to setup.cfg to fix the problem. + +Building and installing +======================= + +**You need to build and install [nanomsg](http://nanomsg.org/) in order to use +these bindings.** +1. Linux + * `cd /path/to/nanomsg-python` + * `python setup.py build` + * `sudo python setup.py install` Example ======= diff --git a/nanomsg/__init__.py b/nanomsg/__init__.py index ab584dc..64bf8c1 100644 --- a/nanomsg/__init__.py +++ b/nanomsg/__init__.py @@ -159,7 +159,7 @@ class Socket(object): """ - _INT_PACKER = _Struct(str('l')) + _INT_PACKER = _Struct(str('i')) class _Endpoint(object): def __init__(self, socket, endpoint_id, address): @@ -382,7 +382,7 @@ def get_int_option(self, level, option): _nn_check_positive_rtn(rtn) if length != size: raise NanoMsgError(('Returned option size (%r) should be the same' - ' as size of int (%r)') % (rtn, size)) + ' as size of int (%r)') % (length, size)) return Socket._INT_PACKER.unpack_from(buffer(buf))[0] def get_string_option(self, level, option, max_len=16*1024):