The goal of this project is to help you to easily set up your custom Python environment including piCorePlayer/Tiny Core Linux extensions, pip dependencies and autostart your scripts on boot.
- Edit the variables at the start of
setup-python-environment.shto fit your needs. (Example: setting up a remote control with FLIRC) - Copy
setup-python-environment.shfrom your local machine to pCP and run it:
scp setup-python-environment.sh tc@pcp.local:~ && ssh tc@pcp.local "./scp setup-python-environment.sh" - Copy your scripts from your local machine to pCP:
scp <your_script> tc@pcp.local:~ - Optional: If you want to run additional scripts on boot, you can add them in
Tweaks > User Commandsby setting one of the commands to this:
sudo -u tc sh -c 'source /usr/local/python-environment/environment/bin/activate; python3 -u /home/tc/<your_script> > /tmp/<your_logfile> 2>&1' - Save and reboot
If you need to access files in your script, make sure to use absolute paths.