python cl working now for inputs

This commit is contained in:
Johannes Wendel
2019-12-06 00:28:33 +01:00
parent 7c115d81a9
commit a9e94e06cc
2 changed files with 7 additions and 8 deletions

View File

@@ -46,11 +46,12 @@ class Networking:
self.get("/displays" + display + "/write_score/" + str(score))
def getInputEvent(self):
header = bytearray()
header = list()
while b'\x02' not in header:
bla = self.input_socket.recv(1)
header.append(bla)
length = int(str(header[:-1]))
return self.input_socket.recv(length)
s = ""
for x in header:
s += x.decode('utf8')
return s