adafruit web ide to normal user

If you are developing using the adafruit web ide then the files are saved

in:  –   /usr/share/adafruit/webide/repositories/my-pi-projects/pythonprojects

however the user name for this is webide

type whoami to see who you are logged in as

(note type pwd to get the current directory)

if you want to run the programs stand alone.  You may want to copy the files to the /home/pi directory to run them

This involves quite a few steps to get things right

firstly

you need  use sudo to copy from one user to another

so ls *.py will list files in the above directory

sudo cp *.py /home/pi

will copy all python files from

/usr/share/adafruit/webide/repositories/my-pi-projects/pythonprojects

to

/home/pi

do this then,  you can either disconnect the adafruit system, connect the pi to a display and login or ssh back in as pi

ssh -x pi@ip or host

enter the uid & password and you should be logged in as pi

once logged in

now do ls -la *.py

ls -la *.py
-rw-r–r– 1 root root 2093 Aug 19 16:14 cylon1.py
-rw-r–r– 1 root root 1048 Aug 19 16:14 globals-ladder1.py
-rw-r–r– 1 root root 1067 Aug 19 16:14 ladderboard2.py
-rw-r–r– 1 root root 1150 Aug 19 16:14 ladderboard3.py
-rw-r–r– 1 root root 557 Aug 19 16:14 ladderboard4.py
-rw-r–r– 1 root root 11343 Aug 19 16:14 memorypuzzle.py
-rw-r–r– 1 root root 1321 Aug 19 16:14 prog4.py
-rw-r–r– 1 root root 45 Aug 19 16:14 test2.py

You end up with the above, note the group and user ownerships are still root

to fix this

pi@raspberrypi ~ $ sudo chown pi *.py

pi@raspberrypi ~ $ ls -la *.py
-rw-r–r– 1 pi root 2093 Aug 19 16:14 cylon1.py
-rw-r–r– 1 pi root 1048 Aug 19 16:14 globals-ladder1.py
-rw-r–r– 1 pi root 1067 Aug 19 16:14 ladderboard2.py
-rw-r–r– 1 pi root 1150 Aug 19 16:14 ladderboard3.py
-rw-r–r– 1 pi root 557 Aug 19 16:14 ladderboard4.py
-rw-r–r– 1 pi root 11343 Aug 19 16:14 memorypuzzle.py
-rw-r–r– 1 pi root 1321 Aug 19 16:14 prog4.py
-rw-r–r– 1 pi root 45 Aug 19 16:14 test2.py

Now change group ownership to pi

pi@raspberrypi ~ $ sudo chgrp pi *.py
pi@raspberrypi ~ $ ls -la *.py
-rw-r–r– 1 pi pi 2093 Aug 19 16:14 cylon1.py
-rw-r–r– 1 pi pi 1048 Aug 19 16:14 globals-ladder1.py
-rw-r–r– 1 pi pi 1067 Aug 19 16:14 ladderboard2.py
-rw-r–r– 1 pi pi 1150 Aug 19 16:14 ladderboard3.py
-rw-r–r– 1 pi pi 557 Aug 19 16:14 ladderboard4.py
-rw-r–r– 1 pi pi 11343 Aug 19 16:14 memorypuzzle.py
-rw-r–r– 1 pi pi 1321 Aug 19 16:14 prog4.py
-rw-r–r– 1 pi pi 45 Aug 19 16:14 test2.py

to run this from the command line you still need to be root to access the gpio however

sudo python cylon1.py – as in run with sudo will or should fix this.