Python and Apache

Tim Roberts timr at probo.com
Wed Apr 18 02:21:48 EDT 2001


David Fuess <fuess1 at home.com> wrote:
>
>The problem was located in the line endings in the script files. I had
>prepared the scripts on my PC and transfered them via FTP. They went
>as binary because the extensions were not recognized as ASCII. It is
>interesting to note, however, that python correctly interpreted the
>files anyway, but neither Linux nor Apache did.

You must have been running this using "python hello".  This would have
failed for you if you had typed at the command line:

   ./hello

In case you're curious, the line-ending problem affects exactly one line:
the first one.  It's not a Python failure nor an Apache failure, but rather
a failure in the Linux loader in processing #! lines.  The system tries to
find /usr/local/bin/python\r, with a carriage return at the end.
Naturally, it failed to find that file.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list