On Fri, Nov 13, 2015 at 12:20 PM, kent nyberg <k...@z-sverige.nu> wrote: > def LoadCommandAndReact(place_to_read): > global RegisterAX > > tmp = place_to_read.read()[RegisterAX:calcsize('HH')]
It looks like you're trying to get a slice of length 4 here, starting at the value of RegisterAX. What you're actually getting is a slice starting at the value of RegisterAX and ending at 4. You probably want this instead: tmp = place_to_read.read()[RegisterAX:RegisterAX + calcsize('HH')] -- https://mail.python.org/mailman/listinfo/python-list