newbie sending hex values over UDP socket

Bill Seitz fluxent at yahoo.com
Tue Sep 14 15:27:14 EDT 2004


Jason Lai <jmlai at uci.edu> wrote in message news:<chr22o$7ra$1 at news.service.uci.edu>...
> 
> Observe:
> 
>  >>> "\x72\x69\x30" == 'ri0'
> True
> 
> Bytes are bytes, regardless of whether you write them as characters, 
> binary, decimals, or hexidecimals.
> 
>   - Jason Lai

OK, so I'm clear on sending a string.

If I want to send a numeric value, do I use something like
  struct.pack('b',int)
?



More information about the Python-list mailing list