How to Run Python Script from iOS Home Screen
On iOS, Pythonista is likely the go-to Python environment runtime for many script writers. I, for one, recommend using Pythonista for any projects that need some horsepower. As I have shared many times, one such problem was generating passwords. It is completely doable on Shortcuts, only that it would be so cumbersome to make it happen.
But as a runtime with in-app editor, there is a strong chance a user will accidentally go into edit before instead of running the script. Certainly I have many times. And it doesn’t help Pythonista has an internal locking mechanism of a finished script. Instead, there is an easy around about way to run the app without getting into the editor first.
- On Pythonista, in wrench icon > Shortcuts > Pythonista URL, copy “Script” path.
- On Shortcuts, create a new shortcut.
- Add a “Run Pythonista Script” action and copy-paste the path from step. 1 into the script selecting field. *
- Next to Shortcut name field, under downward arrow> choose “Add to Home Screen”.
* It is possible to choose from the list inside the action, but it’s not the easiest to navigate.
One big caveat with this method is it still exposes the editor after exiting out from the script. The best course of action is to keep a backup, just in case. Considering Pythonista’s nature, or a smartphone’s nature, I believe the app to be more focused on being a robust ground to run Python codes, not editing and developing them. I’m hoping it to add a simple lock feature to prevent accidents.

Comments will be automatically closed after 30 days.