Don Taylor wrote:
Ed Leafe wrote:

I guess I'm a little confused. Why would Python on Windows have an issue with code that uses the value of 'os.linesep' for that platform? I could see if it were written on Linux and run on Windows or vice versa...

I think that it was complaining that some lines ended with \n and others with \r\n in the same file. Some editors will edit a file with \n separators and insert new lines with \r\n separators and not change the existing lines.

Yep, this was a problem, because we were saving the cdxml as text, letting Python add native line endings but screwing it up because the txt from the dEditor had \n line endings while the rest of the xml had \r\n. On the \n line endings in the file Python would add a \r\n making it \r\r\n. I only figured this out by using hexedit.


I don't know for sure, but I think that as long you are consistent then it does not matter what eol separator you use.

I thought that too, but Python seems to insist on \n only. I'm about to commit my fixes.


--
Paul McNett
http://paulmcnett.com
http://dabodev.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to