mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-10 06:54:45 +00:00
dafd66447f
Former-commit-id: ab13e10271
14 lines
297 B
Python
14 lines
297 B
Python
import signal
|
|
import zmq
|
|
|
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
|
|
|
context = zmq.Context()
|
|
|
|
socket = context.socket(zmq.SUB)
|
|
socket.connect('tcp://localhost:5678')
|
|
socket.setsockopt(zmq.SUBSCRIBE, b'status')
|
|
|
|
while True:
|
|
message = socket.recv_multipart()
|
|
print(f'Received: {message}') |