Sending hex number as is

Terry Reedy tjreedy at
Mon Mar 21 22:21:35 CET 2005

<knguyen at> wrote in message 
news:1111436723.886625.49740 at
> Basically, I just want to send a hex number from one machine to the
> next:

'Hex number' is not completely clear.  Do you want to send the number in 
binary form or in text form.  Text form is much easier and more dependable, 
so should be prefered unless you have a good reason for binary.  When 
sending a text string, you still have a choice between decimal and other 
representations.  Again, decimal is easier and more dependable, and 
therefore prefered, unless the receiving end really demands otherwise.

msg = 'The length is %s' % len(something)

Terry J. Reedy

More information about the Python-list mailing list