[Tutor] About Python Module to Process Bytes
Jerry Hill
malaclypse2 at gmail.com
Tue Aug 4 21:19:57 CEST 2015
On Tue, Aug 4, 2015 at 12:26 PM, Michelle Meiduo Wu <wumeid at hotmail.com> wrote:
> Hi there,
> I'd like to find some python module to easily process bytes array data, like encoding different types of data (char, long, short, float, etc) into a same bytes array. I checked Python built-in library and there are bytes and bytearray types which don't provide enough functions for processing bytes easily.
> Does anybody know if there is other convenient module available for processing bytes?
You're probably looking for the struct module:
https://docs.python.org/3/library/struct.html
--
Jerry
More information about the Tutor
mailing list