> Maybe there aren't 1024 bytes left? According to the docs sysread is > supposed to raise EOFError at the end of the file, are you sure > that's not being raised? Yes, I'm sure. Now that I look back at my original post, I notice that I left out a crucial piece of information: The error raised was an "Invalid Argument" error.