On Fri, Nov 13, 2015 at 1:15 PM, kent nyberg <k...@z-sverige.nu> wrote: > Even with that, it still gets wrong. > I also tried .read()[RegisterAX:RegisterAX+4]
When you call read for the second time, are you just reading the same file again without closing or seeking it in the interim? If that's the case, then you would get an empty string the second time, which would explain your error. Either retain the read data between calls, or call seek(0) before reading it again. -- https://mail.python.org/mailman/listinfo/python-list