[Tutor] packet parsing
Thu, 28 Feb 2002 22:34:49 +0100
On 0, email@example.com wrote:
> > The string *is* the binary stream. A string is just a bunch of bytes.
> That's what I thought. But "print kexrecv" returns nothing in the
Probably they're all unprintable bytes then, like null bytes.
> I just get ">>>" back. "print kexrecv.capitalize()"
> returns nothing. "kexrecv.capitalize()" returns a repr() type value
Right, null bytes.
> OK, that makes sense. But how do I peel of individual bytes? (I just
> played with lstrip and am not having any luck -- but this is probably my
> lack of knowledge).
kexrecv is the first byte, kexrecv the second, etc.
for byte ik kexrecv:
To see the integer values.
And now, Roda JC has scored in Milan! PSV is equal vs Leeds!
(back to watching football :))