[Pythonmac-SIG] python script execution strangeness
Russell E Owen
owen@astro.washington.edu
Mon, 7 Apr 2003 10:15:19 -0700
At 6:59 PM +0200 4/7/03, Just van Rossum wrote:
>Russell E Owen wrote:
>
>> >Your files have the wrong line endings. Should be \n for the
>> >python2.2 whipped with Jaguar. From 2.2.1 and up (I think) Python is
>> >agnostic about line endings, but 2.2 is still picky.
>>
>> 2.2.2 is still picky about line endings.
>
>Hm, it seems you're right. I think MacPython (the non-unix,
>non-framework CFM-based one) might have a special hack, as arbitrary
>line endings do seem to work in MacPython 2.2.2. Jack probably
>remembers.
I can confirm that MacPython 2.2 (even plain 2.2; I've not yet
updated my MacPython past that) handles line endings "intelligently".
It is only the unix version (with or without the MacOS X framework
stuff) that does not. I should have said that the first time.
-- Russell
P.S. For the sake of completeness, but at risk of confusing things:
2.3 will also support reading data from ordinary text files (via file
open, readline, etc.) with platform-independent line endings. But I
think you'll have to specify a new "u" flag to the open call to make
that work.