Hi,


On 25 July 2013 19:45, Kirk Bailey <kbai...@howlermonkey.net> wrote:

>  which python
> /usr/bin/python
> root@KirksPiBox1:/home/pi: ./RR.py
> bash: ./RR.py: /usr/bin/python^M: bad interpreter: No such file or
> directory
> root@KirksPiBox1:home/pi:_
>

Dave's correct.  That "^M" represents ctlr-m, and is the displayable
equivalent of the "Carriage Return" character.  Windows text files uses
CR/LF (Carriage Return, Line Feed) characters to delimit lines of text in
text files. Unix uses only "Line Feed".  So the extra carriage return
character is taken to be part of the text at the end of the shebang line.
 And "/usr/bin/python" is not the same as "/usr/bin/python^M"

Here's some background:
http://mag-sol.com/articles/crlf.html

How and where did you create the file?  If with an editor, which editor?

Walter
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to