def _bytehex(data): """Iterate by one byte with hexlify() output.""" for i in range(0, len(data), 2): yield data[i:i + 2]