how to convert from network to host byte order

Joe Riopel goon12 at gmail.com
Thu Mar 5 14:35:16 CET 2009


On Thu, Mar 5, 2009 at 7:26 AM, Evan <xdicry at gmail.com> wrote:
> Hello ~
>
> I'm new with python,  what my problem is, I have a binary file, I want
> to read first 2 bytes and convert it to host byte order, then write it
> to another file.

Have you checked out socket.htons, socket.ntohs, etc ?



More information about the Python-list mailing list