import os
def Main():
sfilename = r'C:\Users\1111.png'
f = open(sfilename,"rb")
hex_list = ("{:02X}".format(int(c)) for c in f.read())
buflist = list(hex_list)
i = 0
linesize = 16
while True:
buf = buflist[i*linesize:(i+1)*linesize]
if (len(buf) != 0):
print(buf)
else:
break
i = i + 1
Main()