2015-01-05 20:31:02 +08:00
|
|
|
#!/bin/env python
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
fi = open(sys.argv[1], 'rb')
|
|
|
|
fo = open(sys.argv[2], 'wb')
|
|
|
|
|
|
|
|
idx = 0
|
|
|
|
for i in fi.read():
|
|
|
|
idx += 1
|
|
|
|
fo.write('0x%02x, ' % ord(i))
|
|
|
|
if idx % 16 == 0:
|
|
|
|
fo.write('\n')
|
2015-01-06 11:03:01 +08:00
|
|
|
fo.write('\n')
|