file_1 = (r'res\test.png')
with open(file_1, 'rb') as file_1_:
file_1_read = file_1_.read()
file_1_hex = binascii.hexlify(file_1_read)
print ('Hexlifying test.png..')
file_1_size_bytes = len(file_1_read)
file_1_size_bytes_hex = binascii.hexlify(file_1_size_bytes)
print (file_1_size_bytes_hex)
TypeError: 'int' does not support the buffer interface
Ok so im trying to hexlify the .png's byte length here. i know its because the len() of file_1_read is a number. im trying to convert decimal to hexidecimal. how would i go about doing that?
hex? Integer in, hex-representation out. builtin and easy