How can I represent a byte array (like in Java with byte[]) in Python? I\'ll need to send it over the wire with gevent.
byte key[] = {0x13, 0x00, 0x00, 0x00,
An alternative that also has the added benefit of easily logging its output:
hexs = "13 00 00 00 08 00" logging.debug(hexs) key = bytearray.fromhex(hexs)
allows you to do easy substitutions like so:
hexs = "13 00 00 00 08 {:02X}".format(someByte) logging.debug(hexs) key = bytearray.fromhex(hexs)