4-byte string to integer

Tony Sideris tonys111 at erols.com
Wed Oct 4 11:56:16 EDT 2000


"j vickroy" <jim.vickroy at noaa.gov> wrote in message
news:39DB493F.A7AA3E40 at noaa.gov...
> How can a 4-byte string be converted to an unsigned integer using
> Python?
>
> The byte order may be either big or little endian.
>
> Thnaks

use the 'struct' module and unpack().
-Tony






More information about the Python-list mailing list