It is working, but I don't know why???

Bernd Prager vze2nbmq at verizon.net
Wed May 16 09:08:37 EDT 2001


"Bernd Prager" <vze2nbmq at verizon.net> wrote in message
news:OWhM6.82460$Rg2.3417879 at typhoon2.ba-dsg.net...

> I'm havin trouble with the shebang line in python.
> ...
> #! /usr/bin/python
> ...
> [root:/etc/ipcheck]# ./ipcheck.py
> bash: ./ipcheck.py: No such file or directory
>

I listed the first line with the ':l' command in vi. It showed "#!
/usr/bin/python$".
Should be fine.
And the file permissions are
-rwxr-xr-x    1 root     root        94673 May 15 18:12 ipcheck.py*
Should be fine as well.
I had no clou, what it was.
I was even trying to substitute all "invisible" ^M's, but it replied
"Pattern not found: ^M".

So totaly frustated I created a new file. Wrote the first lines by hand and
attached the original file
to this. And SUDDENLY all the lines from the original filed HAD ^M's on
their end!!!
I replaced them and now it is working fine. Isn't that weird???

Thank you for your help!
-- Bernd






More information about the Python-list mailing list