#read and write an xbox eeprom

1 messages · Page 1 of 1 (latest)

livid glade
#

is the open mode "rb" ?

#

in the line with open(FILE_NAME, "rb") as fp: ?

old slate
#

I just tried that, i think it worked

livid glade
#

so what that is, is that reading a file in binary mode "b" returns a bytes string, which is treated like an array of ints so data[i] is an int, otherwise it's a normal string, so data[i] is a string (of one character)

#

we need an int, because we are sending raw bytes

#

(at least the way I wrote it)

#

(otherwise we would have to convert the string to bytes for i2c.writeto)