十六进制的bytearray:找到非十六进制数

时间:2014-10-02 21:42:48

标签: python-2.7 int hex bytearray

我需要从int获取一个bytearray。我试过这个:

bytearray.fromhex(hex(8448))

我从翻译中得到了他的错误:

ValueError: non-hexadecimal number found in fromhex() arg at position 0

从int获取bytearray的正确方法是什么?

0 个答案:

没有答案
相关问题