3 from __future__
import division
10 with
open(filename
, "rb") as fr
:
13 # Parse into chunks of 16 bytes
14 sts
= [sts
[i
:i
+16] for i
in range(0, len(sts
), 16)]
16 with
open(fileout
, "w") as fw
:
19 fw
.write("0x%02x," % (ord(b
) if isinstance(b
, str) else b
))