The problem is entirely in your python code:
You have two variables distance1
and distance2
(let's assume that distance1=666
and distance2=42
and then you construct a string:
tsr = str(distance1 + distance2)
Now this will first evaluate the expression distance1+distance2
(summing them up to 708
) and then create a string from that value ("708"
).
So your Python script sends the munged data.
So your first step is to convert your values to strings before "adding" them (since adding strings is really appending them):
tsr = str(distance1) + str(distance2)
But this will really give you a string "66642"
, as you haven't told the appender to separate the to values with a whitespace.
So one correct solution is:
tsr = str(distance1) + " " + str(distance2)
tsr += ";"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…