prob with struct and byte order

nephish at xit.net nephish at xit.net
Mon Jul 24 20:00:22 EDT 2006


ok. indeed i did do '' instead of ' '.
here is an example of a message
'STX\x00\x00\x004\x00\x00\x00\xc8stateman\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00state1man\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ENX'

tohex gave me '53 54 58 00 00 00 34 00 00 00 c8 70 69 76 6f 74 72 61 63
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 74 72 61 63 31 70 69 76
6f 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 4e 58'

this is the login message (message type 200)

i will try out your code sample when i get to work in the morning.

thanks, gents, for your time and attention on this

sk

John Machin wrote:
> Grant Edwards wrote:
> > On 2006-07-24, Steve Holden <steve at holdenweb.com> wrote:
> > > nephish at xit.net wrote:
> > >
> > >> now the 17758 is significant because it is the actual unit number of
> > >> the machine we want to monitor. I just dont know how to extract the
> > >> real values out of this message.
> >
> > What is meant by "real values"?
> >
>
> :-)
> I guess he means "real" as opposed to unreal/surreal/virtual/imagined,
> not as in the FORTRAN programmer's credo:
> """
> GOD is REAL
> JESUS is INTEGER
> """
> (-:




More information about the Python-list mailing list