Pythonista and iOS Automation

While in general, iOS is pretty nifty, it has some pretty annoying limitations, particularly in regards to inter-app communications (more specifically, the lack thereof). While Pythonista doesn’t complete fix this terrible situation, it does provide some really interesting workarounds.

I’d heard of Pythonista when it first launched, but mostly ignored it since it just seemed like just another Python REPL. Now, it is a Python REPL (2.7) and editor, and it also includes its own 2D graphics and multitouch libs so you can make simple interactive apps with it. Where it starts to get really interesting is that it also includes a bunch of modules, that exposes the iOS clipboard, contacts, location, notifications, etc.

Mostly importantly, it has urllib and webbrowser module support that supports iOS URL callbacks. Pythonista itself supports its own URL scheme of course, lending itself to being called remotely.

Another useful app to use in conjunction with Pythonista is Agile Tortoise’s Drafts. It’s a text editor built specifically to interface with other apps and can serve as an easy briding tool.

There are a fair number of tutorials/guides/scripts available online.

First, some general reference:

And some useful scripts:

Specific HOWTOs: