Mike Hall wrote:

On Mar 23, 2005, at 3:17 AM, Kent Johnson wrote:


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, reading universal did indeed solve my problem, but for the record I'm on OSX, and was reading from a standard plain text file.

OK good. OSX uses line feed (\n) for the line separator. It sounds like your text file has mixed line endings. Mac OS 9 uses carriage return (\r) for line separator, maybe your file has some old data mixed in?


Anyway, I'm glad you got it working!

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to