Parent Page
Python
- For Scripts to run we need Python to work
- Copy Scripts Folder over under roms
- Scripts to boot into attract mode
- Attract Mode
chmod +777
from /RetroPie/roms/scripts
run chmod +777 *.sh so we can exec scripts
Checking that Python is installed
Telnet in
Python is preinstalled in buster OS under /usr/bin/python3, etc.
python --version
returns
Python 2.7.16
python3 --version
Returns
Python3.7.3
/home/pi/py
I have been putting all my scripts here
create a new py folder under /home/pi/ and put our py scripts in it.
$mkdir py
copy python script here
Running a python script
python3 listDevices.py
I get evdev errors
So lets do libinstalls
sudo apt install python3-gpiozero
sudo apt-get install python3-pip
pip3 install evdev
python3 listDevices.py
/dev/input/event2 retrogame
/dev/input/event1 raspberrypi-ts
/dev/input/event0 soc:shutdown_button@3 gpio-keys/input0
retrogame
the scripts in home/pi/py are looking for dragonrise controller.
Need to change these to retrogame