[Pythonmac-SIG] Where's the output?

Chris Barker Chris.Barker@noaa.gov
Thu, 02 May 2002 09:37:07 -0700

Jack Jansen wrote:
> 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.

Unfortunately, this is only a partial fix, as it only fixes the Python
portion of the problem. If you want your script to run as a program, by
setting the executable permission, and putting a #! line at the top,
Darwin will see the whole file as one line, so the #! line won't work.

I just ran into this testing out a Python CGI script, so you still
really need to use *nix line endings in this context.

By the way, Jack, did Guido officially approve the Universal newlines

It is a bit odd that Apple would create this wierd
two-kinds-of-newlines-on-one system mess, but I suppose they had little
choice, and I, for one, apprechiate the new *nix compatability.


Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception