Pythonista App Review: Phase 1

Pythonista is one of the coolest automation apps for iOS.

I’m one of the weird Apple fans that likes the command line equally as the GUI. That’s one of the main reasons I decided to learn Python in 2015. Now that I know a scripting language, a world of opportunity has opened. I no longer rely on the limitations of some apps for extremely specific workflows, I can build them myself!

However, this was only limited to my Mac.

I knew that apps like Editorial, 1Writer and Pythonista existed and had powerful scripting engines built into them, but I was deterred by the seemingly complex code interface. But then I built my first script whose sole purpose was to share links that were shortened with a title in quotes. This involved talking with the Bitly API along with parsing the title of any webpage which is not as easy as it sounds.1 Once I completed that script I felt like I could dip my toe into scripted iOS and Mac automation.

For roughly a year I exclusively worked on scripts for the Mac. However, I became enamored with the latest release of Pythonista. Before, what I thought to be a fairly limited app because of its ability to only run scripts with the app in the foreground I wrote it off. What sold me was the inclusion of the action extension in the latest release. I can now easily create workflows that are expressed effortlessly in Python and interact with the extension’s input. GUI based apps like Workflow are great, but I find a programming language to be more fluent for development. No dragging and dropping or configuring different UI elements, just raw code.

One feature I didn’t think I’d be reaching for as much as I do is the interactive Python console. While I miss iPython from my computer, along with ptipytjon, the simple interactive console allows me to import some modules and get data from different sources on-the-fly. I’m really happy that this is a first class feature of Pythonista.

One major thing that bugs me however is that Python 3 is nowhere to be found. I’ve switched my development over to Python 3 on my Mac and I wish I could easily port scripts over to Pythonista without having to worry about things breaking. For the most part, Pythonista is pretty good about things written in 3, but I’ve run into some issues where I must revert back to 2’s syntax.

Bottom line, if you know Python, or any programming language and you want to automate task on iOS, grab Pythonista and you won’t regret it. I know this is probably a smattering of incoherent thoughts, but this will be an ongoing topic of this blog.

  1. Of course now I’ve rewritten the script and it is pretty much bug free.