mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-09 22:44:44 +00:00
80b63269df
Former-commit-id: e38653c4dc4ffe6aada19cac2251c3ec28bfbc2b
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}') |