convert char to byte representation
Larry Bates
larry.bates at websafe.com
Mon Oct 10 14:25:09 EDT 2005
ord(c) gives you decimal representation of a character.
-Larry Bates
Philipp H. Mohr wrote:
> Hello,
>
> I am trying to xor the byte representation of every char in a string with
> its predecessor. But I don't know how to convert a char into its byte
> representation. This is to calculate the nmea checksum for gps data.
>
> e.g. everything between $ and * needs to be xor:
> $GPGSV,3,1,10,06,79,187,39,30,59,098,40,25,51,287,00,05,25,103,44*
> to get the checksum.
>
>
> Thank you for you help.
>
> Phil
More information about the Python-list
mailing list