import os, sys import threading # add python path of src to sys.path src_path = os.path.join(__file__, *(['..'] * 2)) src_path = os.path.abspath(src_path) sys.path.insert(0, src_path) from microwave.servers import MicroWaveUDPServer class MicroWaveUDPThread (threading.Thread): def __init__(self, server_address, msg_queue): threading.Thread.__init__(self) self.udp_server = MicroWaveUDPServer(server_address, msg_queue) def run(self): print("MicroWaveUDPThread started") self.udp_server.serve_forever() def stop(self): self.udp_server.server_close()