[Tutor] script in Raspberry pi python

Francois Dion francois.dion at gmail.com
Mon Jul 29 13:54:17 CEST 2013


Dont edit unix files on windows, else you might end up with that problem.

It is looking for python^M and not python. Edit with vi and delete the control-M character.

Also, If you need to edit a file with a GUI but have the raspberry pi headless check out:

http://raspberry-python.blogspot.com/2012/09/sidekick.html

http://raspberry-python.blogspot.com/2012/09/sidekick-2.html

Then you can edit with geany or the like, but display on your windows pc.
Francois

Sent from my iPad

On Jul 25, 2013, at 2:45 PM, Kirk Bailey <kbailey at howlermonkey.net> wrote:

> which python 
> /usr/bin/python
> root at KirksPiBox1:/home/pi: ./RR.py
> bash: ./RR.py: /usr/bin/python^M: bad interpreter: No such file or directory
> root at KirksPiBox1:home/pi:_
> 
> 
> 
> 
> On 7/25/2013 1:47 PM, Walter Prins wrote:
>> Hi,
>> 
>> 
>> On 25 July 2013 18:02, Kirk Bailey <kbailey at howlermonkey.net> wrote:
>> 
>> On 7/23/2013 9:42 PM, Amit Saha wrote:
>> On Wed, Jul 24, 2013 at 11:13 AM, Kirk Bailey <kbailey at howlermonkey.net> wrote:
>> Python works fine in pi. script works fine IF I invoke it high church:
>> python ./RR.py
>> 
>> but this fails: ./RR.py
>> the shebang is
>> #!/usr/bon/python
>> bon -> bin
>> right.
>> 
>> 
>> Also, don't forget to chmod +x RR.py
>> already done... I think... yep, 755. RWXR.XR.X!
>> 
>> Therefore, Fhat the Wuck over?
>> 
>> Still not working?  Strange.  Any error message?  What OS?
>> 
>> What's the output of the following entered at the shell prompt:
>> 
>> which python
>> 
>> 
>> 
>> Walter
> 
> -- 
> 
> -Shaboom.
> 
>     Kirk Bailey
>     CEO, Freehold Marketing LLC
>     http://www.OneBuckHosting.com/ 
>     
> Fnord!
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130729/3f0fbac7/attachment.html>


More information about the Tutor mailing list