Baffling unpack() or read() problem......
Thomas A. Bryan
tbryan at python.net
Mon Feb 21 18:19:51 EST 2000
Matthew Joyce wrote:
>
> The code below runs perfectly on Linux on very large files of binary
> data. However it believes it's got to the end of the file prematurely
> in Windows after reading a variable number of sequences of 16 bytes.
>
> Why should it work in Linux and not Windows? What am I missing?
> rawinfile=open(os.path.abspath("nt.raw"),"r")
Isn't the default to open files in text mode?
Try
rawinfile=open(os.path.abspath("nt.raw"),"rb")
More information about the Python-list
mailing list