\r\n or \n notepad editor end line ???

ajikoe at gmail.com ajikoe at gmail.com
Wed Jun 8 09:24:05 EDT 2005


Hello,

I use windows notepad editor to write text.

For example I write (in d:\myfile.txt):
Helo
World

If I open it with python:
  FName = open(d:\myfile.txt,'r')
  h = FName.readlines()
  print h

I get h : ['Helo\n', 'World']

I thought notepad use \r\n to to end the line.

What's wrong with it?

pujo




More information about the Python-list mailing list