picam.py

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

picam.py

Postby buteman » Tue Nov 11, 2014 10:54 am

Hi all,
I downloaded the picam.py script as described in the December Linux Format page 35
I am trying to run it on my laptop NOT my Rpi so that may be the problem.
However when I ran it I got the following:
Code: Select all
./picam.py
bash: ./picam.py: /usr/bin/python^M: bad interpreter: No such file or directory

So I am suspecting there is some end of line character problem.
I then slightly altered it by adding a line at the beginning:
#!/usr/bin/env python

and removing the original first line.
Now I get the following:
Code: Select all
./picam.py
: No such file or directory

So if I am right can anyone suggest how I can remove the ^M or whatever is causing the problem?
tia
buteman
 
Posts: 13
Joined: Mon Nov 05, 2007 7:04 pm
Location: Bute

Re: picam.py

Postby buteman » Tue Nov 11, 2014 11:21 am

Well as soon as I solved this problem I realised it wont work as it runs the raspistill command which is obviously not something available for my laptop platform.
Just in case anyone wants to know the way I got it to at least start to run is as follows:
I opened gedit and also ran
Code: Select all
nano ./picam.py

This opened the file converted from Dos format.
I don't use nano so I am unfamiliar with it.
Not being able to figure out how to save it in this format I copied and pasted it all into gedit then saved it from there.
buteman
 
Posts: 13
Joined: Mon Nov 05, 2007 7:04 pm
Location: Bute

Re: picam.py

Postby nelz » Tue Nov 11, 2014 1:43 pm

Code: Select all
dos2unix picam.py
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Re: picam.py

Postby buteman » Tue Nov 11, 2014 2:51 pm

Hi nelz,
I knew there would be a proper way to do it. :lol:
Not got my brain in gear at the moment
buteman
 
Posts: 13
Joined: Mon Nov 05, 2007 7:04 pm
Location: Bute

Re: picam.py

Postby patrickfairley » Thu Nov 13, 2014 7:00 am

I am not able to understand it... This is also new for me.
patrickfairley
 
Posts: 1
Joined: Thu Oct 30, 2014 9:38 am


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest