Thomas Jollans wrote:
On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
#
./python
-sh: ./python: not found
I'm guessing either there is no file ./python, or /bin/sh is fundamentally
broken.
.... or ./python is a symlink to a file that does not exist, or ./python
is a script and the shebang line points to an interpreter that does not
exist.
The most popular way to get the latter problem is to write the script
on a Windows box and then upload it to Unix box using FTP in binary
mode (or some other transport that doesn't adjust the line endings).
Try the command "file ./python". If it reports something like:
./python: a /usr/bin/python\015 script text executable
, then the \015 tells you that you need to use dos2unix.
It may be the case that /bin/sh is fundamentally broken if it reports
"./python: file not found" if the problem is really the shebang line.
Unfortunately, some shells are fundamentally broken this way.
Hope this helps,
-- HansM
--
http://mail.python.org/mailman/listinfo/python-list