I get bytecode data (b'something') which I try: to .decode('ascii') to check if this is ASCII text. The problem is that
In [11]: b'\x00\x0c\x00'.decode('ascii')
Out[11]: u'\x00\x0c\x00'
so what is recognized as "text" is not really what I want (which are 32 to 126 ASCII codes). Is there a way to use a subset of 'ascii' for the decoding?