Hi Lieven,
> In python when you use '\n' that's automatically converted to CR, LF or CRLF
> depending on the platform. os.linesep is '\r\n' on Windows, but because \n is
> converted actually it becomes '\r\r\n'. You probably only use os.linesep when
> writing in binary mode to files.
>
Is it so? I believe windows libc would write LF as CRLF to disk for
non-binary mode.
I believe python should treat LF as LF and CRLF as CRLF. It has no
business of converting the data.
I don't have a access to win32 now.
Can you tell me the out of the following code?
Open a notepad and write abc.txt with the following snipped content.
<snip>
line1
line2
</snip>
f = open('abc.txt')
print len(f.read())
If it prints '12' my theory would be:
'No need to bother about EOL styles, if the file is created and consumed
by the same platform'
else:
Not sure what to arrive at :)
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 30 16:28:51 2006