From 3a536e184309f04a4ffe9dff446207e7267f2f99 Mon Sep 17 00:00:00 2001 From: tpavelchak Date: Fri, 18 Oct 2019 16:21:47 +0300 Subject: Update print, xrange and unicode functions for python 2/3 compatibility --- bin/logwatcher.py | 2 +- eventmq/subscriber.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/logwatcher.py b/bin/logwatcher.py index dd2860f..1abeb4a 100644 --- a/bin/logwatcher.py +++ b/bin/logwatcher.py @@ -13,4 +13,4 @@ while True: if events.get(s) == zmq.POLLIN: msg = s.recv_multipart() - print msg # noqa + print(msg) # noqa diff --git a/eventmq/subscriber.py b/eventmq/subscriber.py index f585572..ef1aa0b 100644 --- a/eventmq/subscriber.py +++ b/eventmq/subscriber.py @@ -1,6 +1,7 @@ """ derp subscriber """ +from past.builtins import xrange import zmq @@ -18,4 +19,4 @@ if __name__ == "__main__": # block until something comes in. normally you'd do something with # this in another thread or something for s in sockets: - print s.recv_multipart() # noqa + print(s.recv_multipart()) # noqa -- cgit v1.2.1