3 byte network ordered int, How To ?

2010-01-06 Thread mudit tuli
For a single byte, struct.pack(') For two bytes, struct.pack(') what if I want three bytes ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Got a single octet from socket, what to do ?

2009-12-04 Thread mudit tuli
Stephen, thanks a lot for the reply. This worked for me. I had a look at the struct module earlier but ignored it due to lack of examples, I'll look more into it. Mudit On Sat, Dec 5, 2009 at 8:17 AM, Stephen Hansen wrote: > On Fri, Dec 4, 2009 at 6:39 PM, mudit tuli wrote: > >&

Got a single octet from socket, what to do ?

2009-12-04 Thread mudit tuli
I am very new to Python and started getting to know socket programming recently. Made a socket server, which receives a "Single Octet"(treated as a single 8-bit integer field) from a client. But I am not sure what to do with this "Single Octet" and how to decode it into a long integer, so that I ca