How to convert binary file data?

Chris Barker chrishbarker at home.net
Wed May 9 15:33:02 EDT 2001


Courageous wrote:
> >> I must be missing something here. I am reading a file that has
> >> binary data and want to be able to handle/convert it...
> 
> >Look at the struct module.
> 
> Also, the array module. The struct module decodes heterogenous
> binary data; the array module decodes runs of homogenous binary
> data.

Also think about NumPy, it can be a lot fster for LOTS of data.



-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list