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
Post a Comment