A quick note to self… If we test python scripts on an EV3 brick interactively via a Jupyter notebook and then save the notebook as a python file (eg Untitled1.py), we can get the Python file over to the EV3 brick and into a state we can run it from the file browser by using the following recipe:
echo '#!/usr/bin/python'|cat - Untitled1.py > /tmp/out && mv /tmp/out Untitled1.py
scp Untitled1.py email@example.com:/home/robot/
ssh firstname.lastname@example.org 'chmod ugo+x /home/robot/Untitled1.py'
Then in the file browser on the brick, just click on Untitled1.py to run it.
It would be easy enough to script this so a single button in the notebook does it automatically? (In which case, it would probably make more sense to modify the template used to generate the Python save file so that it includes the shebang at the start of the file anyway?)