On Sep 1, 12:31 pm, MRAB <pyt... at mrabarnett.plus.com> wrote: > You should open the files in binary mode, not text mode, ie file(path, > "rb"). Text mode is the default. Not a problem on *nix because the line > ending is newline. Thanks. That was it.