I have results of script in text and bytes stored in CSV text file, which looks like:
found_value_1;b'UT\x05\x00\x03'
found_value_2;b'UT\x05\x00\x04'
There is some text and, separated by semicolon, dump of bytes. I was seriously looking, but could not find instructions or examples on how could I read this file's corresponding part as bytes. Manually I can copy b'UT\x05\x00\x03' and paste it to a variable like this:
found_value_1 = b'UT\x05\x00\x03'
and it is ready to go as type 'bytes'. It was simple to read this file and have 'u' type variables created with values like "b'UT\x05\x00\x03'" (probably having double-slashes), but as I tried converting it back to bytes nothing of available examples worked for me. Help is appreciated.