Need help with struct module

Gordon Scott gscott2112 at hotmail.com
Thu Oct 2 23:16:20 EDT 2003


hmmm, I'll try that.

I'm not exactlly transferring the file over a socket.  Just writing a binary
file and manually copying it up to the device.
Did the same thing in Java, dumped a binary file on my desktop and copied it
over to the device without any problem.

"Richard Brodie" <R.Brodie at rl.ac.uk> wrote in message
news:blhc7f$l18 at newton.cc.rl.ac.uk...
>
> "Gordon Scott" <gscott2112 at hotmail.com> wrote in message
> news:D1Web.6875$YO5.4091894 at news3.news.adelphia.net...
>
> > why in this example are the packing of 9 and 10 not showing '\x00\x09'
and
> > '\x00\x0a' respectively?
>
> It's the canonical representation of that string, after round tripping the
> escaping/unescaping. No different to:
> >>> ('\x41')
> 'A'
>
> > On the target device when I read the file into a memory buffer and
examine
> > the contents, the value of 10 ('\x00\n') that I am expecting is
litterally 00 0D
> > and NOT 00 0A.
>
> I guess at some point you've read/written/transferred the file without the
binary flag.
> Try dumping the file on each platform to see where it got converted. Then
go back
> and add a few '\x62's.
>
>






More information about the Python-list mailing list