receive last data

This commit is contained in:
Philipp Kramer 2022-05-31 15:34:27 +02:00
parent c7fa00906d
commit 9ff7ac13e0

View file

@ -21,9 +21,11 @@ while True:
try: try:
data = client.recv( 1024 ).decode( 'utf-8' ) data = client.recv( 1024 ).decode( 'utf-8' )
if data: if data:
splitdata=data.split(",") lastdata=data.split('\n')
splitdata=lastdata[-2].split(",")
print("lastdata="+str(lastdata))
print("Received :", repr(data)) #print("Received :", repr(data))
print(splitdata) print(splitdata)
except socket.error: except socket.error:
pass pass