summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-12 15:20:57 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-12 15:20:57 +0200
commitd34574c9688791a83c0b18f501546228bcb40ccb (patch)
tree35f08c6e62410c4d65a7954c987fed36a7dcf2be /doc
parentf69b4a1da493c73192aa0c86749bd6bcf396422d (diff)
downloaddabmod-d34574c9688791a83c0b18f501546228bcb40ccb.tar.gz
dabmod-d34574c9688791a83c0b18f501546228bcb40ccb.tar.bz2
dabmod-d34574c9688791a83c0b18f501546228bcb40ccb.zip
Fix zmq_remote.py for python3
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/zmq-ctrl/zmq_remote.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/zmq-ctrl/zmq_remote.py b/doc/zmq-ctrl/zmq_remote.py
index dffe53e..3a54b20 100755
--- a/doc/zmq-ctrl/zmq_remote.py
+++ b/doc/zmq-ctrl/zmq_remote.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
import sys
import zmq
@@ -18,7 +18,7 @@ message_parts = sys.argv[2:]
# first do a ping test
print("ping")
-sock.send("ping")
+sock.send(b"ping")
data = sock.recv_multipart()
print("Received: {}".format(len(data)))
for i,part in enumerate(data):
@@ -32,7 +32,7 @@ for i, part in enumerate(message_parts):
print("Send {}({}): '{}'".format(i, f, part))
- sock.send(part, flags=f)
+ sock.send(part.encode(), flags=f)
data = sock.recv_multipart()