[Chennaipy] Binary file conversion

Mohamed ali Abdul kkngrmohd at gmail.com
Fri Sep 11 03:30:14 EDT 2020


Thanks Mr. Vijay.
Sorry for not mentioning the subject.
I want to make 2 bytes reading and printing
values from the list or file
Mohamed ali

Sir,

Good morning.


 Binary header file  of SEGY data(seismic data).
The binary file is to be converted in to human readable format.
Each four byte data to be converted with index using python.
Pl. help me.
I got stuck up here.

binary header file:
######
b'\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x07\x00\t\x00\x01\x00\x01\x00\x01\x00\x00\x00\x00\x00\x03\xffp\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x9c\xff\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x07\xd0\x07\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17q\x03\xe8\x00\x01\x00\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xe4\x00\x80\x00\x0b\x00\x1d\x003\x00\x05\x03\xd2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x039\x99\xdaa\x00\x00\x00\x03\x00\x00\xff\xf6\x00\x00\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\x9c'

#########


Thanks
ading and
printing values (human readable format)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20200911/2b21fe0d/attachment.html>


More information about the Chennaipy mailing list