[Tutor] .readlines() condensing multiple lines

Kent Johnson kent37 at tds.net
Wed Mar 23 12:17:08 CET 2005


Liam Clarke wrote:
> Oh right, From his email, I got the impression he was getting a list like - 
> [[abc\rdef\rghi\r]]

We really need a clarification of what is in the original file and what results he is getting. My 
impression is that it is mixed line endings so the result of readlines is multiple strings some of 
which contain data from multiple lines, but it's really not clear from the OP.

Anyway, Mike, it seems clear that your file has line endings in it which are not consistent with the 
default for your OS. If reading with universal newlines doesn't solve the problem, please let us 
know what OS you are running under and give more details about the data.

Kent



More information about the Tutor mailing list