how would i run a python script in the background?
-
am planning on making some kind of portable flight console thing with a game called elite frontier 2. i already made the flight setup with a joystick and throttle but its all with an arduino uno so i would have to use python to interface with the arduino uno and then type keys using the keyboard library with pyserial in python. the device am using is the raspberry pi zero w 1 to run elite frontier 2.
and no i do not have pins on my zero nor can i solder on some since i dont have a setup for soldering. -
Look at this pdf guide and choose one of the methods that are appropriate for your script. If in doubt, choose method 4 (using systemd).
-
@mitu ok cool, so i use .service to run a python script but is python 3 automatically installed in retropie? and if not how would i install it?
-
RetroPie is not an OS, but a collection of scripts. For the Pi platform, it uses RaspiOS underneath, so every software available/working in RaspiOS should work/be installable on the RetroPie image.
And yes,
python3
is included in the RetroPie image, though depending on your script you may need to install additional Python modules. -
@mitu alright thanks man! this will help me so much on this project!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.