From ee7bef7295e5a45f1b6517e240ade9629d8e5702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 25 Apr 2021 12:33:49 +0200 Subject: [PATCH] fix json in zmq --- zmq/publisher.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zmq/publisher.py b/zmq/publisher.py index 4de94b6..39d551b 100644 --- a/zmq/publisher.py +++ b/zmq/publisher.py @@ -1,7 +1,4 @@ #!/usr/bin/env python3 -import itertools -import sys - import zmq @@ -10,7 +7,7 @@ socket = context.socket(zmq.PUB) socket.bind("tcp://127.0.0.1:5559") n = 10 -msg_body = "a" * n +msg_body = "\"" + "a" * n + "\"" try: while True: socket.send_string(f"test {msg_body}")