Grant Edwards wrote: > On 2006-07-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > My problem now, is that I need to send certain binary data over a > > socket. That is, I want to make some bytes, and stuff them in a TCP > > packet, send them down the pipe, and then listen for a response. ... > > In my understaing the above just sends the string '\x01\x02\x03\x04', > > not raw binary data. > > The string '\x01\x02\x03\x04' consists of four octets having > the values 0x01, 0x02, 0x03, 0x04. > > Are those not the four octets you wanted to send? > > -- > Grant Edwards
i.e. >>> len('\x01\x02\x03\x04') 4 -- http://mail.python.org/mailman/listinfo/python-list