Re: in over my head ascii
- From: Steve Holden <steve@xxxxxxxxxxxxx>
- Date: Tue, 07 Feb 2006 12:24:05 -0500
nephish@xxxxxxx wrote:
ok, i am stuck again.
from the docs, the byte stream is supposed to look like this:
'S' 'T' 'X' [length indicator] [message type] [message] 'E' 'N' 'X'
the length indicator it says is a four byte integer number of a value N
( N would be how long the message body is )
the message type comes from a table in the docs. In my case, the
message type is 200. This is also supposed to be sent as a 4 byte
value.
so..... how do i make 200 occupy 4 bytes ?
You use the struct module and make sure you specify the correct "endianness" - bet you didn't bargain for all this when you started!
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
.
- Follow-Ups:
- Re: in over my head ascii
- From: nephish
- Re: in over my head ascii
- References:
- in over my head ascii
- From: nephish
- Re: in over my head ascii
- From: nephish
- Re: in over my head ascii
- From: nephish
- Re: in over my head ascii
- From: mensanator@xxxxxxx
- Re: in over my head ascii
- From: nephish
- Re: in over my head ascii
- From: mensanator@xxxxxxx
- Re: in over my head ascii
- From: Blair P. Houghton
- Re: in over my head ascii
- From: nephish
- Re: in over my head ascii
- From: nephish
- in over my head ascii
- Prev by Date: Re: Is Python good for web crawlers?
- Next by Date: Re: Is Python good for web crawlers?
- Previous by thread: Re: in over my head ascii
- Next by thread: Re: in over my head ascii
- Index(es):
Relevant Pages
|