def main():
f = open(r"C:\ti\mmwave_industrial_toolbox_3_4_0\labs\lab0011-pplcount\lab0011_pplcount_quickstart\fhistRT.mat", "rb")
outfile = open(r"C:\ti\mmwave_industrial_toolbox_3_4_0\labs\lab0011-pplcount\lab0011_pplcount_quickstart\out.txt", "wb")
i = 0
while 1:
c = f.read(1)
i = i + 1
str(c, encoding="gb18030",errors = 'ignore')
if not c:
break
if i % 32 == 0:
outfile.write(b"\n")
else:
if ord(c) <= 15:
outfile.write(b"0x0" + hex(ord(c))[2:].encode()+ b" ")
else:
outfile.write(hex(ord(c)).encode() + b" ")
outfile.close()
f.close()
if __name__=="__main__":
main()