\r\n or \n notepad editor end line ???
Simon Brunning
simon.brunning at gmail.com
Wed Jun 8 10:03:06 EDT 2005
On 8 Jun 2005 06:44:40 -0700, ajikoe at gmail.com <ajikoe at gmail.com> wrote:
> It means in windows we should use 'wb' to write and 'rb' to read ?
> Am I right?
It depends what you are trying to do with the file. If you are
processing it as a text file, open it as a text file, and all will be
well:
my_file = open('my_file.txt')
for line in my_file:
# whatever...
--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/
More information about the Python-list
mailing list