I have a program, which needs to continuously run in the background, but be able to receive instructions to change. I have this thread running, which sends data to an Arduino and receives data back:
class receiveTemp (threading.Thread):
def __init__(self, out):
threading.Thread.__init__(self)
self.out = out
def run(self):
self.alive = True
try:
while self.alive:
rec = send("command")
self.out.write(rec)
except BaseException as Error:
print(Error)
pass
Now I need to change the command I send with an external program.
I tried using Pyro4, but I can not seem to get a Thread running on the server and then controlling it with the client.
Any ideas?