Re: Sending hex number as is

2005-03-24 Thread Antoon Pardon
Op 2005-03-21, [EMAIL PROTECTED] schreef <[EMAIL PROTECTED]>: > This question may be ased before, but I couldn't find the answer > searching the archive. > > Basically, I just want to send a hex number from one machine to the > next: Hex numbers don't exist. You have just numbers. Those numbers ca

Re: Sending hex number as is

2005-03-21 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 shou

Re: Sending hex number as is

2005-03-21 Thread Grant Edwards
On 2005-03-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > msg = "Length is " > n = '\x81' > msg += n > sock.send(msg) > > The problem is n's value is not fixed. For example, > > msg = "Length is " > n = len(somestring) > msg += n # This won't work of course, since n is int > > How do I send t

Re: Sending hex number as is

2005-03-21 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > This question may be ased before, but I couldn't find the answer > searching the archive. > > Basically, I just want to send a hex number from one machine to the > next: > > for example > > msg = "Length is " > n = '\x81' > msg += n > sock.send(msg) > > The problem is

Sending hex number as is

2005-03-21 Thread knguyen
This question may be ased before, but I couldn't find the answer searching the archive. Basically, I just want to send a hex number from one machine to the next: for example msg = "Length is " n = '\x81' msg += n sock.send(msg) The problem is n's value is not fixed. For example, msg = "Length