mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
12 lines
170 B
Python
Executable File
12 lines
170 B
Python
Executable File
#!/usr/bin/env python3
|
|
import sys
|
|
|
|
with open(sys.argv[1], 'r') as file:
|
|
s = file.read()
|
|
|
|
b = bytearray()
|
|
b.extend(map(ord, s))
|
|
|
|
for a in b: print(hex(a), end =", ")
|
|
|