ft8_lib/utils/convert_generator.py

7 lines
157 B
Python
Raw Normal View History

2018-10-18 15:42:43 +08:00
import sys
for line in sys.stdin:
line = line.strip()
b = ['0x' + line[i*2:i*2+2] for i in range(len(line)/2)]
print '{ %s },' % (', '.join(b))