[Tutor] Problem reading from a file
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Thu Jan 22 13:26:22 EST 2004
On Thu, 22 Jan 2004, Isr Gish wrote:
> I have a registry file that I'm trying to read. But it is only reading
> part of the file. When it comes to certain text it stops reading. (I
> would send along the file but the list doesn't let send attachments).
Hi Isr,
Registry files are 'binary' files, and on Windows systems, this detail
matters --- Python may be mistakenly trying to treat the registry file as
a 'text' file. Are you opening the files in binary mode?
Good luck to you!
More information about the Tutor
mailing list