[Pythonmac-SIG] Where's the output?
Jack Jansen
Jack.Jansen@cwi.nl
Wed, 1 May 2002 15:51:25 +0200
On Wednesday, May 1, 2002, at 03:18 , Barron Snyder wrote:
> tmk's idea however, panned out. It was the line endings! In OS X, I use
> BBEdit and didn't realize that it was defaulting to mac line endings
> rather than unix line endings. Actually, until tmk mentioned it, I
> wasn't aware that you could save a file both ways in OS X. I thought
> everything was unix. But why doesn't this throw an error?
I was going to say something completely different, but then I thought
about it for a while, and there's little Python can do about it. The
whole file is seen as a single line, albeit one without a terminating
newline, and it starts with a # so it's a comment line. Or, in other
words, it functions as an empty file.
But: this will be fixed as of Python 2.3, because there it'll understand
any newline convention, so your script will work as expected.
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma
Goldman -