Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72260
| References | <e94b4d33-3ccf-44c7-94c2-4f6f6f566ff0@googlegroups.com> <5387BE21.4010404@mrabarnett.plus.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2014-05-29 17:20 -0600 |
| Subject | Re: Binary data exchange |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10463.1401405690.18130.python-list@python.org> (permalink) |
On Thu, May 29, 2014 at 5:09 PM, MRAB <python@mrabarnett.plus.com> wrote: > On 2014-05-29 23:08, RasikaSrinivasan@gmail.com wrote: >> the received data for the messages 9 thru 13 are not as expected. >> >> I wonder if anyone can see what I am doing wrong? >> >> Appreciate any hints. thanks, srini >> > I don't understand why you're using the .strip method. That's for > stripping whitespace from text, but you're not sending and receiving > text, you're sending and receiving binary data. And indeed, ASCII characters 9-13 are all whitespace. The receiver appears to be stripping off the first byte of the (presumably little-endian) data and thus shifting the whole struct by a byte for those entries.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Binary data exchange "RasikaSrinivasan@gmail.com" <RasikaSrinivasan@gmail.com> - 2014-05-29 15:08 -0700
Re: Binary data exchange "RasikaSrinivasan@gmail.com" <RasikaSrinivasan@gmail.com> - 2014-05-29 15:13 -0700
Re: Binary data exchange MRAB <python@mrabarnett.plus.com> - 2014-05-30 00:09 +0100
Re: Binary data exchange "RasikaSrinivasan@gmail.com" <RasikaSrinivasan@gmail.com> - 2014-05-29 16:25 -0700
Re: Binary data exchange Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-30 00:56 +0100
Re: Binary data exchange Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-29 17:20 -0600
csiph-web