9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 22:13:38 +01:00
qp2/ocaml/tests/test_pub.py

16 lines
280 B
Python
Raw Normal View History

2023-08-21 14:54:41 +02:00
#!/usr/bin/env python3
2019-01-25 11:39:31 +01:00
import zmq
import sys, os
def main():
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect("tcp://127.0.0.1:41280")
socket.setsockopt(zmq.SUBSCRIBE, "")
while True:
print socket.recv()
if __name__ == '__main__':
main()