newbie trouble with #!

Harald Kirsch kirschh at lionbioscience.com
Wed May 16 02:53:58 EDT 2001


"Bernd Prager" <vze2nbmq at verizon.net> writes:
> [root:/etc/ipcheck]# ./ipcheck.py
> bash: ./ipcheck.py: No such file or directory
> 
> -- snip -----------
> 
> When I type /usr/bin/python ipcheck.py everything works fine.
> I'm using Python 1.5.2. Does anybody have an idea what that could be.
> (I was already checking if I got some weird character within the first line:
> I didn't!)

Well, but in fact this is the exact behaviour I get if the first line,
has a trailing ^M on a Unix machine. Don't believe your editor or
`more' or `less' or `cat'. Recent versions try to be clever and hide a
^M at the end of the line.

  Harald Kirsch

-- 
----------------+------------------------------------------------------
Harald Kirsch   | kirschh at lionbioscience.com | "How old is the epsilon?"
LION bioscience | +49 6221 4038 172          |        -- Paul Erdös
       *** Please do not send me copies of your posts. ***



More information about the Python-list mailing list