1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00
Files
python-escpos/escpos/utils.py
2014-05-31 17:36:00 +03:00

10 lines
176 B
Python

try:
bytes.fromhex
def hex2bytes(hex_string):
return bytes.fromhex(hex_string)
except:
def hex2bytes(hex_string):
return hex_string.decode('hex')