I don't know how to convert Python's bitarray to string if it contains non-ASCII bytes. Example:
>>> string='\x9f'
>>> array=bytearray(string)
>>> array
bytearray(b'\x9f')
>>> array.decode()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9f in position 0: ordinal not in range(128)
In my example, I just want to somehow get a string '\x9f' back from the bytearray. Is that possible?