[Tutor] More confusion on conversion

Alan Gauld alan.gauld at blueyonder.co.uk
Thu Oct 30 19:02:02 EST 2003


> which is equivalent to
> 
> length = 10
> port.write('%02X' % length)  # one of my previous suggestions

Nope, coz that sends a string - including the string terminator.
Vicki needs to send the two characters one after the other.
But all the hex convertions are unnecessary apart from the 
initial one.

Assuming I have understood correctly.

Alan G.





More information about the Tutor mailing list