mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 12:55:37 +01:00
16 lines
275 B
Python
16 lines
275 B
Python
|
#!/usr/bin/python
|
||
|
|
||
|
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()
|