Input data to a list from a binary file using python -


i have binary file. need input each byte list creating, in such way whole binary file of hexadecimal numbers in list. have tried following out, not working f binary file

f1=[] f1 = f.read(1) 

this duplicate of answer.

reading binary file in python , looping on each byte

to quote skurmedel's answer:

f = open("myfile", "rb") try:     byte = f.read(1)     while byte != "":         # stuff byte.         byte = f.read(1) finally:     f.close() 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -