Answer: str() or repr()
--- --- --- --- ---
So if one uses
You get this
There are of course plenty of decoding options.
But ... what I like to get is 'exactly' that "\x81\x..." printed string in string form. (For direct further processing. Mainly debug related.)
Is that possible?
(Figure I could use some tmp file ... well maybe, not tried that yet. Copying it from the I/O terminal is not really workable of course.)
--- --- --- --- ---
So if one uses
print('bytestr:test-0', bytestr) on some byte string.You get this
Output:bytestr:test-0 b'\x81\xff\xffscale\x00\x0f\x00\x00\x80@\x00\x89PNG... as output.There are of course plenty of decoding options.
But ... what I like to get is 'exactly' that "\x81\x..." printed string in string form. (For direct further processing. Mainly debug related.)
Is that possible?
(Figure I could use some tmp file ... well maybe, not tried that yet. Copying it from the I/O terminal is not really workable of course.)
